亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Flume怎樣安裝部署

發布時間:2021-12-16 10:48:06 來源:億速云 閱讀:139 作者:小新 欄目:開發技術

這篇文章主要介紹了Flume怎樣安裝部署,具有一定借鑒價值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。

環境:

1.flume-ng-1.6.0-cdh6.7.0.tar.gz

2.jdk 1.8

1.下載安裝包并解壓
wget http://archive.cloudera.com/cdh6/cdh/5/flume-ng-1.6.0-cdh6.7.0.tar.gz

tar -xvf flume-ng-1.6.0-cdh6.7.0.tar.gz

rm flume-ng-1.6.0-cdh6.7.0.tar.gz

mv apache-flume-1.6.0-cdh6.7.0-bin    flume

2.配置環境變量
vi /etc/profile

export  FLUME_HOME=/opt/software/flume
exportPATH=.:$FLUME_HOME/bin:$KAFKA_HOME/bin::$ZOOKEEPER_HOME/bin:$PATH

source /etc/profile

3. 配置flume-env.sh文件

cd  /opt/software/flume/conf/

cp flume-env.sh.template flume-env.sh
vi  flume-env.sh

export HADOOP_HOME=/opt/software/hadoop
export JAVA_HOME=/usr/java/jdk1.8.0_45

4.版本驗證
flume-ng version
5.Flume部署示例
cd /opt/software/flume/bin/

vi netcat.conf

# 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 that 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

6.運行FlumeAgent,監聽本機的44444端口


 flume-ng agent -c conf -f  netcat.conf -n a1 -Dflume.root.logger=INFO,console

[root@hadoop001 bin]# flume-ng agent -c conf -f  netcat.conf -n a1 -Dflume.root.logger=INFO,console
Info: Including Hadoop libraries found via (/opt/software/hadoop-2.6.0-cdh6.7.0/bin/hadoop) for HDFS access
Info: Excluding /opt/software/hadoop-2.6.0-cdh6.7.0/share/hadoop/common/lib/slf4j-api-1.7.5.jar from classpath
Info: Excluding /opt/software/hadoop-2.6.0-cdh6.7.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar from classpath
Info: Including Hive libraries found via (/opt/software/hive-1.1.0-cdh6.7.0) for Hive access

.......

18/03/25 17:52:39 INFO instrumentation.MonitoredCounterGroup: Component type: CHANNEL, name: c1 started
18/03/25 17:52:39 INFO node.Application: Starting Sink k1
18/03/25 17:52:39 INFO node.Application: Starting Source r1
18/03/25 17:52:39 INFO source.NetcatSource: Source starting
18/03/25 17:52:40 INFO source.NetcatSource: Created serverSocket:sun.nio.ch.ServerSocketChannelImpl[/127.0.0.1:44444]

7.打開另外一個client     

telnet localhost 44444

[root@hadoop001 ~]# telnet localhost 44444
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
111


OK18/03/25 18:11:15 WARN source.NetcatSource: Client sent event exceeding the maximum length
18/03/25 18:12:50 INFO sink.LoggerSink: Event: { headers:{} body: 31 31 31 0D                                     111. }

8.完畢

感謝你能夠認真閱讀完這篇文章,希望小編分享的“Flume怎樣安裝部署”這篇文章對大家有幫助,同時也希望大家多多支持億速云,關注億速云行業資訊頻道,更多相關知識等著你來學習!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

自治县| 浦江县| 兴安盟| 剑阁县| 临汾市| 塔河县| 普陀区| 手游| 定州市| 大港区| 永善县| 襄樊市| 庆安县| 搜索| 花垣县| 津南区| 巴塘县| 新乡县| 和硕县| 诏安县| 黄陵县| 张家口市| 夏邑县| 八宿县| 新营市| 集贤县| 株洲市| 屯昌县| 昭觉县| 竹北市| 任丘市| 斗六市| 江川县| 措美县| 澄迈县| 陆川县| 陆河县| 石楼县| 通渭县| 开封县| 当阳市|