Flume监听文件并上传到HDFS
监听任意一个文件,并将监控结果上传到hdfs的/flume目录下
1.编写配置文件
#me the components on this agent
a1.sources = r1
a1.sinks = k1
a1.channels = c1
# Describe/configure the source
# exec即execute执行命令
a1.sources.r1.type = exec
# 要执行的命令
a1.sources.r1.command = tail -F /root/flume_tail.log
# 执行shell脚本的绝对路径
a1.sources.r1.shell = /bin/bash -c
# Describe the sink<