srdo edited a comment on issue #2974: STORM-3355: Use 
supervisor.worker.shutdown.sleep.secs to set worker s…
URL: https://github.com/apache/storm/pull/2974#issuecomment-473419628
 
 
   The reason for replacing `Runtime.halt` with `Runtime.exit` everywhere is 
most likely that `Runtime.exit` invokes shutdown hooks before quitting, where 
`Runtime.halt` just kills the JVM immediately. It looks to me like that commit 
is an attempt to do best-effort cleanup (e.g. running `Worker.shutdown`) on 
shutdown, where the previous behavior was to just suicide the JVM immediately.
   
   Since the behavior before that commit was for the worker to just die 
immediately on shutdown, I think the shutdown hook was probably added in the 
worker because that was the same way it was done for the daemons.
   
   I'm still not sure the shutdown hook is necessary for the worker, but I 
don't think it hurts either.
   
   Edit: Thanks for looking into why the hook is there btw.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to