flm.conf ::
Name the components on this agent
a1.sources = r1
a1.sinks = k1
a1.channels = c1
Describe/configure the source
a1.sources.r1.type = exec
a1.sources.r1.command = tail -F /opt/gen_logs/logs/access.log
Describe the sink
a1.sinks.k1.type = hdfs
a1.sinks.k1.fileType=DataStream
a1.sinks.k1.hdfs.path = /user/saswat232/iventfromflume
Use a channel which buffers events in file
a1.channels.c1.type = file
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 100
Bind the source and sink to the channel
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1
Command to Start flume agent ::
flume-ng agent --name a1 --conf /home/saswat232/conf --conf-file /home/saswat232/conf/flm.conf
output of hadoop fs -ls command
-rw-r–r-- 3 saswat232 hdfs 1233 2016-12-23 01:48 /user/saswat232/iventfromflume/FlumeData.1482475708699
-rw-r–r-- 3 saswat232 hdfs 1385 2016-12-23 01:48 /user/saswat232/iventfromflume/FlumeData.1482475708700
-rw-r–r-- 3 saswat232 hdfs 1458 2016-12-23 01:48 /user/saswat232/iventfromflume/FlumeData.1482475708701
-rw-r–r-- 3 saswat232 hdfs 1322 2016-12-23 01:48 /user/saswat232/iventfromflume/FlumeData.1482475708702
-rw-r–r-- 3 saswat232 hdfs 1399 2016-12-23 01:48 /user/saswat232/iventfromflume/FlumeData.1482475708703
-rw-r–r-- 3 saswat232 hdfs 1362 2016-12-23 01:48 /user/saswat232/iventfromflume/FlumeData.1482475708704