flume-ng安装和简单使用例子

1.安装jdk。html

2.下载解压flume,修改bin/netcat-memory-logger.conf,内容以下:shell

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 终端窗口此时会打印出信息,就表示成功了。ui

参考:.net

Flume NG 简介及配置实战架构设计

Flume(NG)架构设计要点及配置实践设计

相关文章
相关标签/搜索