Skip to content

Instantly share code, notes, and snippets.

@jamesrajendran
Last active January 19, 2019 23:54
Show Gist options
  • Save jamesrajendran/def40807bb437275217f6db437bd2f00 to your computer and use it in GitHub Desktop.
Save jamesrajendran/def40807bb437275217f6db437bd2f00 to your computer and use it in GitHub Desktop.
--ftohdfs.conf--
ftohdfs.sources = logsource
ftohdfs.sinks = hdfssink
ftohdfs.channels = mchannel
# Describe/configure the source
ftohdfs.sources.logsource.type = exec
ftohdfs.sources.logsource.command = tail -F /opt/gen_logs/logs/access.log
# Describe the sink
ftohdfs.sinks.hdfssink.type = hdfs
ftohdfs.sinks.hdfssink.hdfs.path = hdfs://quickstart.cloudera:8020/user/cloudera/flume_data
ftohdfs.sinks.hdfssink.hdfs.fileType = DataStream
# Use a channel which buffers events in memory
ftohdfs.channels.mchannel.type = memory
ftohdfs.channels.mchannel.capacity = 1000
ftohdfs.channels.mchannel.transactionCapacity = 100
# Bind the source and sink to the channel
ftohdfs.sources.logsource.channels = mchannel
ftohdfs.sinks.hdfssink.channel = mchannel
----
start the log gen - /opt/gen_logs/start_logs.sh
flume-ng agent -n ftohdfs -c . -f ftohdfs.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment