2019独角兽企业重金招聘Python工程师标准>>>
1、配置
#example.conf:单节点Flume配置
#命名Agent a1的组件
a1.sources = r1
a1.sinks = k1
a1.channels = c1
#描述/配置Source
a1.sources.r1.type = netcat
a1.sources.r1.bind = 0.0.0.0
a1.sources.r1.port = 44444
#描述Sink
a1.sinks.k1.type = logger
#描述内存Channel
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 100
#为Channle绑定Source和Sink
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1
2、启动
bin/flume-ng agent --conf conf --conf-file conf/http.conf --name http -Dflume.root.logger=INFO,console
nohup bin/flume-ng agent --conf conf --conf-file conf/test.conf --name a1 >flume.log &
3、telnet
4、flume 收到消息