Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Flume, mail # user - Adding an interceptor


Copy link to this message
-
Adding an interceptor
Rahul Ravindran 2012-11-07, 21:18
Apologies. I am new to Flume, and I am probably missing something fairly obvious. I am attempting to test using a timestamp interceptor and host interceptor but I see only a sequence of numbers in the remote end.

Below is the flume config:

agent1.channels.ch1.type = MEMORY
agent1.channels.ch1.capacity = 500

agent1.sources.seq_gen.channels = ch1
agent1.sources.seq_gen.type = SEQ

agent1.sources.seq_gen.interceptors = inter1 host1
#agent1.sources.seq_gen.interceptors.inter1.type = org.apache.flume.interceptor.TimestampInterceptor$Builder
agent1.sources.seq_gen.interceptors.inter1.type = TIMESTAMP
agent1.sources.seq_gen.interceptors.inter1.preserveExisting = false

#agent1.sources.seq_gen.interceptors.host1.type = org.apache.flume.interceptor.HostInterceptor$Builder
agent1.sources.seq_gen.interceptors.host1.type = HOST
agent1.sources.seq_gen.interceptors.host1.preserveExisting = false
agent1.sources.seq_gen.interceptors.host1.hostHeader = hostname
agent1.sources.seq_gen.interceptors.host1.useIP = false
agent1.sinks.avroSink1.type = avro
agent1.sinks.avroSink1.channel = ch1
agent1.sinks.avroSink1.hostname = <remote server>
agent1.sinks.avroSink1.port = 4545
agent1.sinks.avroSink1.connect-timeout = 300000

agent1.channels = ch1
agent1.sources = seq_gen
agent1.sinks = avroSink1