You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flume.apache.org by manish jaiswal <ma...@gmail.com> on 2016/04/28 14:34:35 UTC

flume kafka to solr

Hi ,

I m not able to push data to solr from kafka using flume.

where is wrong I am using flume 1.6.0 and slor 5.1.0.
i donot know whether i have add any jar.


and donot know how to create morphline.conf

my morphline.conf:


# Specify server locations in a SOLR_LOCATOR variable; used later in
# variable substitutions:
SOLR_LOCATOR : {
  # Name of solr collection
  collection : gettingstarted

  # ZooKeeper ensemble
  zkHost : "localhost:9983/solr"
}
morphlines : [
  {
    # Name used to identify a morphline. For example, used if there are
multiple
    # morphlines in a morphline config file.
    id : morphline1

  importCommands : ["com.cloudera.**", "org.apache.solr.**"]



 commands : [
      {
        # Parse input attachment and emit a record for each input line
        readLine {
          charset : UTF-8
        }
      }

           # load the record into a Solr server or MapReduce Reducer
      {
        loadSolr {
          solrLocator : ${SOLR_LOCATOR}
        }
      }
]
  }
]






Error:



2016-04-28 17:42:25,072 (lifecycleSupervisor-1-3) [ERROR -
org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:253)]
Unable to start SinkRunner: {
policy:org.apache.flume.sink.DefaultSinkProcessor@28171195 counterGroup:{
name:null counters:{} } } - Exception follows.
org.kitesdk.morphline.api.MorphlineCompilationException: No command builder
registered for name: loadSolr near: {
    # /home/manishj/m1.conf: 25
    "loadSolr" : {
        # /home/manishj/m1.conf: 3
        #  Specify server locations in a SOLR_LOCATOR variable; used later
in
        #  variable substitutions:
        "solrLocator" : {
            # /home/manishj/m1.conf: 5
            #  Name of solr collection
            "collection" : "gettingstarted",
            # /home/manishj/m1.conf: 8
            #  ZooKeeper ensemble
            "zkHost" : "localhost:9983/solr"
        }
    }
}

Please help.