flume1.4安装
解压
tar -zxvf apache-flume-1.6.0-bin.tar.gz tar -zxvf apache-flume-1.6.0-src.tar.gz
copy src中的内容到bin中
cp -ri apache-flume-1.6.0-src/* apache-flume-1.6.0-bin/
在conf创建example文件
#agent1表示代理名称 agent1.sources=source1 agent1.sinks=sink1 agent1.channels=channel1 #配置source1 agent1.sources.source1.type=spooldir agent1.sources.source1.spoolDir=/root/hmbbs agent1.sources.source1.channels=channel1 agent1.sources.source1.fileHeader = false agent1.sources.source1.interceptors = i1 agent1.sources.source1.interceptors.i1.type = timestamp #配置sink1 agent1.sinks.sink1.type=hdfs agent1.sinks.sink1.hdfs.path=hdfs://centos:9000/hmbbs agent1.sinks.sink1.hdfs.fileType=DataStream agent1.sinks.sink1.hdfs.writeFormat=TEXT agent1.sinks.sink1.hdfs.rollInterval=1 agent1.sinks.sink1.channel=channel1 agent1.sinks.sink1.hdfs.filePrefix=%Y-%m-%d #配置channel1 agent1.channels.channel1.type=file agent1.channels.channel1.checkpointDir=/root/hmbbs_tmp/123 agent1.channels.channel1.dataDirs=/root/hmbbs_tmp/
启动
bin/flume-ng agent -n agent1 -c conf -f conf/example -Dflume.root.logger=DEBUG,console
在hmbbs目录创建一个文件,flume会把它自动上传到hdfs上
相关推荐
zzjmay 2020-06-07
chenguangchun 2020-04-18
chenguangchun 2020-07-26
myt0 2020-07-18
IT影风 2020-07-18
chenguangchun 2020-06-28
jiaomrswang 2020-06-26
myt0 2020-06-16
xiaoxiaojavacsdn 2020-06-08
strongyoung 2020-06-04
ErixHao 2020-05-20
啦啦啦啦啦 2020-05-15
wanfuchun 2020-05-14
onwaygoahead 2020-05-05
xiaoxiaojavacsdn 2020-05-01
QAnyang 2020-03-14
wsong 2020-03-13