0

Hi I'm trying to use morphline inteceptor and convert my syslog to JSON for start i tried to use split command for splitting my string ,but im getting error as below:

"" Source r1 has been removed due to an error during configuration com.typesafe.config.ConfigException$WrongType: /root/flume.17/conf/morph.conf: 21: Cannot concatenate object or list with a non-object-or-list, ConfigString("split") and SimpleConfigObject({"outputFields":"substrings","inputField":"message","addEmptyStrings":false,"isRegex":false,"trim":true,"separator":" "}) are not compatible""

my morphline configuration file:

morphlines : [
{
# Name used to identify a morphline. E.g. used if there are multiple
# morphlines in a morphline config file
id : morphline1

# Import all morphline commands in these java packages and their
# subpackages. Other commands that may be present on the classpath are
# not visible to this morphline.
importCommands : ["org.kitesdk.**"]

commands : [
  {
    # Parse input attachment and emit a record for each input line              

readLine {
      charset : UTF-8
    }
  }

  ,split {
  inputField : message
  outputFields : "substrings"     
  separator : " "       
  isRegex : false     

  addEmptyStrings : false
  trim : true          }
       }
      }

   ]
  }
 ]

what do i have to do?I'm new to this

ar.sh
  • 1
  • 1

1 Answers1

0

From morhpline documentation

outputField - The name of the field to add output values to, i.e. a single string. Example: tokens. One of outputField or outputFields must be present, but not both.

outputFields - The names of the fields to add output values to, i.e. a list of strings. Example: [firstName, lastName, "", age]. An empty string in a list indicates omit this column in the output. One of outputField or outputFields must be present, but not both.

So you should just specify

outputField : substrings

instead of

outputFields : "substrings"

http://kitesdk.org/docs/1.1.0/morphlines/morphlines-reference-guide.html#split

Community
  • 1
  • 1
oh54
  • 478
  • 1
  • 3
  • 12
  • yes,i didn't used right syntax ,i have corrected my conf file,but i still get same error – ar.sh Feb 17 '17 at 10:51