时间:2018年6月20日12:05:57
【前言】
flume的介绍可以参考前面:《flume(1):三个内置基本组件:channel、source、sink》;
【bug】
系统的flume线程启动后,常常运行一段时间后被系统挂起;
原来的启动脚本:
eg:
bin/flume-ng agent –conf ./conf/ -f conf/simple-agent.properties -Dflume.root.logger=DEBUG,console -n agent
修改后的脚本:
eg:
nohup bin/flume-ng agent –conf ./conf/ -f conf/simple-agent.properties -Dflume.root.logger=DEBUG,console -n agent &
使用nohup 和 & 执行脚本,打印的日志会保存在nohup.log文件,因此,监听该文件即可了解flume是否正常工作了:
tail -f nohup.log