阻止风暴:正确的方式

编程入门 行业动态 更新时间:2024-10-15 16:24:23
本文介绍了阻止风暴:正确的方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

有没有一种干净的方法来阻止风暴而不用杀死XXX杀死它,其中XXX是PID?

Is there a clean way to stop storm without killing it with "kill XXX" where XXX is the PID?

我运行storm kill topology-name到杀死拓扑,但在那之后,是否有一种干净的方式来关闭工人,灵气,主管和ui?

I run "storm kill topology-name" to kill the topology, but after that, is there a clean way to shutdown workers, nimbus, supervisor and ui?

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

I didn't find any command which corresponds to this from the documentation: github/nathanmarz/storm/wiki/Command-line-client

推荐答案

命令杀死拓扑(正如你刚才所说)

command to kill the topology ( as you rightly mentioned )

storm kill topology-name

现在关闭群集需要对每个节点运行以下命令

Now to shutdown the cluster you need to run the following command to each node

sudo service supervisord stop

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

Give supervisord a few seconds to shutdown all processes. Note that trying to run supervisorctl when supervisord itself is stopped will result in an error message (this appears to be a known user interface issue in supervisord 2.x)

来自这个文档

如何杀死包括工作进程在内的所有Storm进程?当您停止群集时碰巧正在运行的任何工作线程(由从属节点上的Supervisor守护程序启动)将继续运行。这是Storm的一个深思熟虑的设计决策,因为它意味着崩溃/重启Nimbus和Supervisor守护进程不会影响Storm中的任何运行拓扑。缺点是你必须付出一些额外的努力来完全停止集群中所有与Storm相关的进程。

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.

# If you want to kill ALL processes follow this procedure on the slave nodes: $ sudo supervisorctl stop storm-supervisor $ sudo pkill -TERM -u storm -f 'backtype.storm.daemon.worker'

更多推荐

阻止风暴:正确的方式

本文发布于:2023-10-28 04:30:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1535524.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:正确   风暴   方式

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!