You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "Robert Joseph Evans (JIRA)" <ji...@apache.org> on 2013/12/23 18:03:50 UTC
[jira] [Commented] (STORM-183) Supervisor/worker shutdown hook
should be called in distributed mode.
[ https://issues.apache.org/jira/browse/STORM-183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13855764#comment-13855764 ]
Robert Joseph Evans commented on STORM-183:
-------------------------------------------
My only issue here is that we really would want to back up the kill -15 with a kill -9 a little while later. We cannot be sure that the process is down unless we use the -9. But this would either mean that we have to wait a certain amount of time no matter what in between the two calls or we need a way to check if the process is still up. I can see the check being added in later if needed, but I don't want to rely on user code to always exit cleanly when asked politely.
> Supervisor/worker shutdown hook should be called in distributed mode.
> ---------------------------------------------------------------------
>
> Key: STORM-183
> URL: https://issues.apache.org/jira/browse/STORM-183
> Project: Apache Storm (Incubating)
> Issue Type: Bug
> Reporter: caofangkun
> Priority: Minor
> Attachments: STORM-183-1.patch
>
>
> if the process is killed forcefully from the OS or if it's crashing due to resource issues (e.g., out of memory), shutdown hooks won't be invoked.
> -TERM (15)
> The process is requested to stop running; it should try to exit cleanly
> -KILL (9)
> The process will be killed by the kernel; this signal cannot be ignored.
> So should we better use 'kill -15' ?
> See:
> https://github.com/apache/incubator-storm/blob/master/storm-core/src/clj/backtype/storm/util.clj#L392
> https://github.com/apache/incubator-storm/blob/master/storm-core/src/clj/backtype/storm/daemon/supervisor.clj#L175
> will never be called for supervisor:
> https://github.com/apache/incubator-storm/blob/master/storm-core/src/clj/backtype/storm/daemon/supervisor.clj#L396
> will never be called for worker:
> https://github.com/apache/incubator-storm/blob/master/storm-core/src/clj/backtype/storm/daemon/worker.clj#L421
> We'd better add something like :
> (.addShutdownHook (Runtime/getRuntime) (Thread. (fn [] (.shutdown mk-sv)))))) ?
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)