标签:capacity image 主机名 配置文件 技术分享 window example 解压 amp
创建配置文件:在解压后的文件apache-flume-1.6.0-bin/conf下创建一个example.conf,内容如下。
# example.conf: A single-node Flume configuration # Name the components on this agent a1.sources = r1 a1.sinks = k1 a1.channels = c1 # Describe/configure the source a1.sources.r1.type = netcat a1.sources.r1.bind = localhost a1.sources.r1.port = 44444 # Describe the sink a1.sinks.k1.type = logger # Use a channel which buffers events in memory a1.channels.c1.type = memory a1.channels.c1.capacity = 1000 a1.channels.c1.transactionCapacity = 100 # Bind the source and sink to the channel a1.sources.r1.channels = c1 a1.sinks.k1.channel = c1
2.1、打开cmd进入到apache-flume-1.6.0-bin\bin目录下,运行如下命令。
flume-ng.cmd agent -conf ../conf -conf-file ../conf/example.conf -name a1 -property flume.root.logger=INFO,console
效果图(右键查看原图):
2.2、另外打开一个cmd窗口,运行如下命令。
telnet localhost 44444
如果连接成功,则该窗口会变为输入状态,可以输入文字。同时在步骤2中的cmd窗口中,也会显示接收到的信息。 效果图(右键查看原图):
标签:capacity image 主机名 配置文件 技术分享 window example 解压 amp
原文地址:https://www.cnblogs.com/duanxz/p/9157299.html