Reply
Explorer
Posts: 9
Registered: ‎09-10-2013

Error: Flume integration with Solr sink

[ Edited ]

Hello all,

 

I am working on CDH version: 4.3.0-1 and Flume version : 1.3 and trying to index the data using solr sink via Flume.

 

Following command, I used to start the agent:

 

flume-ng agent -f /opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/etc/flume-ng/conf.empty/flume.conf -n a1 Dflume.root.logger=DEBUG,console

 Following command, I used to start the client:

 

flume-ng avro-client -H 10.0.7.243 -p 10001 -F /root/example.xml

Following is flume.conf file: 

 

a1.sources = r1
a1.sinks = k1
a1.channels = c1

# Describe/configure the source
a1.sources.r1.type = avro
a1.sources.r1.bind = localhost
a1.sources.r1.port = 10001

# Describe the sink
a1.sinks.k1.type = org.apache.flume.sink.solr.SolrSink
a1.sinks.k1.serializer = org.apache.flume.sink.solr.SolrBasicEventSerializer
a1.sinks.k1.serializer.validHeaderFields = name,id
a1.sinks.k1.batchSize = 500
a1.sinks.k1.threadCount = 2
a1.sinks.k1.serializer.bodyFieldname = body
a1.sinks.k1.serverUrl = http://localhost:8983/solr/collection1/
a1.sinks.k1.hosts = vm4.pal.com

# Use a channel which buffers events in memory
a1.channels.c1.type = memory
a1.channels.c1.capacity = 100000000
a1.channels.c1.transactionCapacity = 100000000
a1.channels.c1.maxFileSize = 214643507100

# Bind the source and sink to the channel
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1

 
Following error message, I am getting:

 

2013-09-19 17:49:53,230 ERROR [concurrentUpdateScheduler-1-thread-1] impl.ConcurrentUpdateSolrServer (ConcurrentUpdateSolrServer.java:handleError(354)) - error
java.lang.Exception: Bad Request request: http://localhost:8983/solr/collection1/update?wt=javabin&version=2
    at org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer$Runner.run(ConcurrentUpdateSolrServer.java:208)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:636)
2013-09-19 17:49:53,232 INFO  [concurrentUpdateScheduler-1-thread-1] impl.ConcurrentUpdateSolrServer (ConcurrentUpdateSolrServer.java:run(239)) - finished: org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer$Runner@52b57e9a

 

Can anyone please help me to resolve the issue.

 

Thanks in advance.

Highlighted
Cloudera Employee
Posts: 146
Registered: ‎08-21-2013

Re: Error: Flume integration with Solr sink

We don't support this sink - it appears to be an experimental patch that was never released.

What we do support is the Apache Flume Morphline Solr Sink which can be configured as described here: http://flume.apache.org/FlumeUserGuide.html#morphlinesolrsink