gpt4 book ai didi

java - 以正确的方式停止 Apache Storm

转载 作者:太空狗 更新时间:2023-10-29 22:40:01 24 4
gpt4 key购买 nike

是否有一种干净的方法来停止 Storm 而不用 kill XXX 杀死它,其中 XXX 是 PID?

我运行 storm kill topology-name 来终止拓扑,但在那之后,是否有一种干净的方法来关闭 worker、nimbus、supervisor 和 ui?

我没有从文档中找到与此对应的任何命令:https://github.com/nathanmarz/storm/wiki/Command-line-client

最佳答案

终止拓扑的命令(正如您正确提到的那样):

storm kill topology-name

要关闭集群,您需要在每个节点上运行以下命令:

sudo service supervisord stop

注意:supervisord 几秒钟的时间来关闭所有进程。请注意,当 supervisord 本身停止时尝试运行 supervisorctl 将导致错误消息(这似乎是 supervisord 2.x 中已知的用户界面问题)

来自 this文档

How to kill ALL Storm processes including worker processes? Any worker threads (launched by the Supervisor daemons on the slave nodes) that happen to be running when you are stopping the cluster will continue to run. This is a deliberate design decision of Storm because it means that crashing/restarting Nimbus and Supervisor daemons will not affect any running topologies in Storm. The downside is that you have to put some extra effort into fully stopping all Storm-related processes in a cluster.

如果你想杀死所有进程,请在从属节点上执行以下过程:

$ sudo supervisorctl stop storm-supervisor
$ sudo pkill -TERM -u storm -f 'backtype.storm.daemon.worker'

关于java - 以正确的方式停止 Apache Storm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19926548/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com