Flume实战监听网络端口
生活随笔
收集整理的這篇文章主要介紹了
Flume实战监听网络端口
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
具體的配置解釋見(jiàn)官網(wǎng)
http://flume.apache.org/FlumeUserGuide.html#flume-sources
1、flume安裝目錄下新建文件夾 example?
2、在example下新建文件?
netcat-logger.conf 內(nèi)容如下: #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 = nbdo3 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 = c13、啟動(dòng)命令 flume-ng agent -c ../conf -fnetcat-logger.conf -n a1 -Dflume.root.logger=INFO,console 解釋: -c ../conf 指定flume自身的配置文件所在目錄
-f conf/netcat-logger.conf ? 指定我們所描述的采集方案
-n a1 ? 指定我們這個(gè)agent的名字
4、clone session 啟動(dòng)telnet 如果telnet命令無(wú)效,安裝telnet。見(jiàn)博文:http://www.cnblogs.com/yangxia-test/p/4159891.html
5、測(cè)試 telnet 輸入 hello world
flume監(jiān)聽(tīng)到的畫(huà)面
-------------
更多的Java,Angular,Android,大數(shù)據(jù),J2EE,Python,數(shù)據(jù)庫(kù),Linux,Java架構(gòu)師,:
http://www.cnblogs.com/zengmiaogen/p/7083694.html
總結(jié)
以上是生活随笔為你收集整理的Flume实战监听网络端口的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 数据连接池druid 和 大数据框架dr
- 下一篇: 常用Oracle分析函数详解