标签:
1.安装jdk。
2.下载解压flume,修改bin/netcat-memory-logger.conf,内容如下:
agent1.sources = sources1 agent1.channels = channels1 agent1.sinks = sinks1 agent1.sources.sources1.type = netcat agent1.sources.sources1.bind = localhost agent1.sources.sources1.port = 44444 agent1.channels.channels1.type = memory agent1.channels.channels1.capacity = 1000 agent1.channels.channels1.transactionCapacity = 100 agent1.sinks.sinks1.type = logger agent1.sources.sources1.channels = channels1 agent1.sinks.sinks1.channel = channels1
3.启动flume-ng
bin/flume-ng agent --conf conf --conf-file bin/netcat-memory-logger.conf --name agent1 -Dflume.root.logger=INFO,console
4.然后再开一个 shell 终端窗口,telnet 上配置中侦听的端口,就可以发消息看到效果了,Flume 终端窗口此时会打印出信息,就表示成功了。
参考:
标签:
原文地址:http://my.oschina.net/cjun/blog/510704