You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flume.apache.org by christopher palm <cp...@gmail.com> on 2014/09/16 16:01:40 UTC

Static Interceptors Not Working

All,

I am trying to get the static interceptor to insert key, value information
in each line that is written
out in my data sink.
I have tried this with various configurations, but can't seem to get any
output from the interceptor
to show up in the output files produced by Flume in the target data
directory.
Below is my latest config, using spooldir as the source and a file_roll
sink as the output.

Any suggestions as to what I am configuring wrong here?

Thanks,
Chris

client.channels=ch1
client.channels.ch1.type=memory
client.channels.ch1.capacity=100000
client.channels.ch1.transactionCapacity=100000

client.sources=src-1
client.sources.src-1.type=spooldir
client.sources.src-1.spoolDir=/opt/app/solr/flume/sinkIn
client.sources.src-1.deserializer.maxLineLength=10000
client.sources.src-1.interceptors = i1
client.sources.src-1.interceptors.i1.type = static
client.sources.src-1.interceptors.i1.preserveExisting = false
client.sources.src-1.interceptors.i1.key = datacenter
client.sources.src-1.interceptors.i1.value= NYC_01
client.sinks=k1
#client.sinks.k1.type=avro
#client.sinks.k1.hostname=localhost
#client.sinks.k1.port=42424
## Debugging Sink, Comment out AvroSink if you use this one
# http://flume.apache.org/FlumeUserGuide.html#file-roll-sink
client.sinks.k1.type = file_roll
client.sinks.k1.sink.directory = /opt/app/solr/flume/sinkOut
client.sinks.k1.sink.rollInterval = 0

# Connect soure and sink with channel
client.sources.src-1.channels=ch1
client.sinks.k1.channel=ch1

Re: Static Interceptors Not Working

Posted by Ashish <pa...@gmail.com>.
Try using HEADER_AND_TEXT as serializer for sink, default is Text
Serializer that writes only the Event body.

On Tue, Sep 16, 2014 at 7:31 PM, christopher palm <cp...@gmail.com> wrote:

> All,
>
> I am trying to get the static interceptor to insert key, value information
> in each line that is written
> out in my data sink.
> I have tried this with various configurations, but can't seem to get any
> output from the interceptor
> to show up in the output files produced by Flume in the target data
> directory.
> Below is my latest config, using spooldir as the source and a file_roll
> sink as the output.
>
> Any suggestions as to what I am configuring wrong here?
>
> Thanks,
> Chris
>
> client.channels=ch1
> client.channels.ch1.type=memory
> client.channels.ch1.capacity=100000
> client.channels.ch1.transactionCapacity=100000
>
> client.sources=src-1
> client.sources.src-1.type=spooldir
> client.sources.src-1.spoolDir=/opt/app/solr/flume/sinkIn
> client.sources.src-1.deserializer.maxLineLength=10000
> client.sources.src-1.interceptors = i1
> client.sources.src-1.interceptors.i1.type = static
> client.sources.src-1.interceptors.i1.preserveExisting = false
> client.sources.src-1.interceptors.i1.key = datacenter
> client.sources.src-1.interceptors.i1.value= NYC_01
> client.sinks=k1
> #client.sinks.k1.type=avro
> #client.sinks.k1.hostname=localhost
> #client.sinks.k1.port=42424
> ## Debugging Sink, Comment out AvroSink if you use this one
> # http://flume.apache.org/FlumeUserGuide.html#file-roll-sink
> client.sinks.k1.type = file_roll
> client.sinks.k1.sink.directory = /opt/app/solr/flume/sinkOut
> client.sinks.k1.sink.rollInterval = 0
>
> # Connect soure and sink with channel
> client.sources.src-1.channels=ch1
> client.sinks.k1.channel=ch1
>



-- 
thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal