Interceptors error


My flume conf file is as below:
#Define source , sink , channel and agent.
agent1.sources = source1
agent1.sinks = sink1
agent1.channels = channel1

Describe/configure source1

Agent1.sources.source1 .type = exec
agent1.sources.source1.command = tail -F /opt/gen_logs/logs/access.log
#Define interceptors
Agent1.sources.source1. interceptors.i1.type=timestamp
agent1.sources.source1. interceptors.i1.preserveExisting=true

Describe sink1 = memory-channel
agent1.sinks.sink1.type = hdfs
agent1.sinks. sink1.hdts.path = /user/kumsavarthami/flume_practice/flume3/% y/%m/%d/%H%M
agent1 .sinks.sink1 .hdfs.fileType = DataStream

Now we need to define channel1 property.

agent1.channels.channel1.type = memory
agent1.channels.channel1.capacity = 1000
agent1 .channels.channel1 .transactioncapacity = 100

Bind the source and sink to the channel

agent1.sources.source1.channels = channel1
agent1.sinks.sink1 .channel = channel1

started the flume agent as
flume-ng agent --name a1 --conf-file /home/kumsavarthami/flume_demo/example.conf --conf /etc/flume/conf

getting the below error:
Caused by: java.lang.NullPointerException: Expected timestamp in the Flume event headers, but it was null

Learn Spark 1.6.x or Spark 2.x on our state of the art big data labs

  • Click here for access to state of the art 13 node Hadoop and Spark Cluster