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
使用以下条带启动我的水槽代理: bin / flume-ng agent -n a1 -c conf -f conf / flume_log.conf -Dflume.root.logger = INFO,console
问题1:运行结果如下,但如果运行成功,我不知道!
问题2:有句子如下,我不知道“水槽测试的排序”是什么意思:
注意:要测试Flume代理是否正常运行,请打开一个新的终端窗口并将目录更改为/ home / horton / solutions /: horton @ ip:〜$ cd / home / horton / solutions / 运行以下脚本,将日志条目写入nodemanager.log: $ ./test_flume_log.sh 如果成功,您应该在HDFS的/ user / horton / flume_sink目录中看到新文件 停止logagent Flume代理
答案 0 :(得分:0)
根据您的水槽配置,每当更改文件/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