2016-01-07 90 views
1

enter image description here水槽和試驗水槽的運行結果

enter image description here

my flume configuration file is as follows: 
 

 
a1.sources = r1 
 
a1.sinks = k1 
 
a1.channels = c1 
 
# Describe/configure the source 
 
a1.sources.r1.type = exec 
 
a1.sources.r1.channels = c1 
 
a1.sources.r1.command = tail -F /home/hadoop/flume-1.5.0-bin/log_exec_tail 
 
# 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

而且開始我用下面的stript水槽劑: 斌/水槽-NG代理-n A1 -c conf -f conf/flume_log.conf -Dflume.root.logger =信息,控制檯

問題1:運行結果如下,但是如果運行成功或者不成功,我不知道!

問題2:還有就是句子如下,我不知道是什麼的均值在「水槽試驗的queation」:

注意:要測試水槽代理運行正常,開一個新的終端窗口並將目錄更改爲/ home/horton/solutions /: horton @ ip:〜$ cd/home/horton/solutions/ 運行以下腳本,它將日誌條目寫入nodemanager.log: $ ./ test_flume_log.sh 如果成功,您應該在HDFS的/ user/horton/flume_sink目錄中看到新文件 停止登錄Agent Flume代理

回答

0

根據您的flume配置,每當/home/hadoop/flume-1.5.0-bin/log_exec_tail文件發生更改時,它都會執行尾部操作並將結果追加到控制檯中。

因此,爲了測試它正常工作,

1. run the command bin/flume-ng agent -n a1 -c conf -f conf/flume_log.conf -Dflume.root.logger=INFO,console 
2. Open a terminal and add few lines in the file /home/hadoop/flume-1.5.0-bin/log_exec_tail 
3. Save it 
4. Now check the terminal where you triggered flume command 
5. You can see newly added lines displayed