Stopping Storm: the right way

后端 未结 4 838
眼角桃花
眼角桃花 2021-02-04 04:35

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

I run \"storm kill topology-name\" to kill the topology, but after that, is

4条回答
  •  一个人的身影
    2021-02-04 04:49

    Command to kill a topology (as you rightly mentioned):

    storm kill topology-name
    

    To shutdown the cluster you need to run the following command on each node:

    sudo service supervisord stop
    

    Note: 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)

    From this documentation

    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'
    

提交回复
热议问题