[英]Stopping Flume Agent
I have a requirement where I want to run Flume agent with spooling directory as source.我有一个要求,我想以假脱机目录作为源运行 Flume 代理。 After all the files from the spool directory is copied to HDFS(sink) I want the agent to stop as I know all the files are pushed to channel.将假脱机目录中的所有文件复制到 HDFS(sink) 后,我希望代理停止,因为我知道所有文件都已推送到通道。 Also I want to run this steps for different spooling directories each time and stop the agent when all files from the directory are marked as .COMPLETED.此外,我想每次为不同的假脱机目录运行此步骤,并在目录中的所有文件都标记为 .COMPLETED 时停止代理。 Is there any way to stop the flume agent?有什么办法可以阻止flume agent?
For now I could suggest that on running flume agent you open the flume agent terminal.现在我建议在运行水槽代理时打开水槽代理终端。 Then on this terminal execute ctrl+c and agent is gone.然后在这个终端上执行 ctrl+c 并且代理消失了。
2 ways to stop the Flume agent:两种停止 Flume 代理的方法:
Open another duplicate session window , then use below command .打开另一个重复的会话窗口,然后使用下面的命令。
ps –ef | ps –ef | grep flume grep水槽
take out the process_id, and use below command to kill取出process_id,并使用以下命令杀死
kill -9 process_id kill -9 process_id
This worked for me.这对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.