Hi, as always: it depends. ;)
Storm itself clear ups its own resources just fine. However, if the running topology needs to clean-up/release resources before it is shut down, Storm is not of any help. Even if there is a Spout/Bolt cleanup() method, Storm does not guarantee that it will be called. Thus, using "storm deactivate" is a good way to achieve proper cleanup. However, the topology must provide some code for it, too. On the call to Spout.deactivate(), it must emit a special "clean-up" message (that you have to design by yourself) that must propagate through the whole topology, ie, each bolt must forward this message to all its output streams. Furthermore, bolts must to the clean-up if they receive this message. Long story short: "storm deactivate" before "storm kill" makes only sense if the topology requires proper cleanup and if the topology itself can react/cleanup properly on Spout.deactivate(). Using "storm activate" in not necessary in any case. -Matthias On 09/28/2015 05:08 PM, Garcia-Contractor, Joseph (CORP) wrote: > Hi all, > > > > I am a DevOps guy and I need implement a storm cluster > with the proper start and stop init scripts on a Linux server. I > already went through the documentation and it seems simple enough. I am > using supervisor as my process manager. I am however having a debate > with one of the developers using Storm on the proper way to shutdown > Storm and I am hoping that you fine folks can help us out in this regard. > > > > The developer believes that before you tell supervisor to > kill (SIGTERM) the storm workers, supervisor, and nimbus, you must first > issue a “storm deactivate topology-name”, then tell supervisor to kill > all the various processes. He believes this because he doesn’t know if > Storm will do an orderly shutdown on SIGTERM and that there is a chance > that something will get screwed up. This also means that when you start > storm, after nimbus is up, you need to issue a ““storm activate > topology-name”. > > > > I am of the belief that because of storms fast fail and > because it guarantees data processing, none of that is necessary and > that you can just tell supervisor to stop the process. > > > > So who is right here? > > ------------------------------------------------------------------------ > This message and any attachments are intended only for the use of the > addressee and may contain information that is privileged and > confidential. If the reader of the message is not the intended recipient > or an authorized representative of the intended recipient, you are > hereby notified that any dissemination of this communication is strictly > prohibited. If you have received this communication in error, notify the > sender immediately by return email and delete the message and any > attachments from your system.
signature.asc
Description: OpenPGP digital signature
