要点:
1.linux上必须有hadoop,并已经启动起来,因为使用的是hadfsink
2.在a2.sources.r2.command必须需要使用流式命令,如tail,cat,而不是如 date之类的
a2.sources = r2
a2.sinks = k2
a2.channels = c2
# Describe/configure the source
a2.sources.r2.type = exec
a2.sources.r2.command = tail -F /export/servers/hive-1.2.1/logs/hive.log
a2.sources.r2.shell = /bin/bash -c
# Describe the sink
a2.sinks.k2.type = hdfs
a2.sinks.k2.hdfs.path = hdfs://hadoop01:9000/flume/%Y%m%d/%H