[
https://issues.apache.org/jira/browse/STORM-183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14031069#comment-14031069
]
ASF GitHub Bot commented on STORM-183:
--------------------------------------
Github user revans2 commented on a diff in the pull request:
https://github.com/apache/incubator-storm/pull/139#discussion_r13768469
--- Diff: storm-core/src/clj/backtype/storm/util.clj ---
@@ -412,6 +404,41 @@
(defn sleep-until-secs [target-secs]
(Time/sleepUntil (* (long target-secs) 1000)))
+(def ^:const sig-kill 9)
+
+(def ^:const sig-term 15)
+
+(defn send-signal-to-process [pid signum]
--- End diff --
This was just recently merged in. The guidelines are under
https://github.com/apache/incubator-storm/blob/master/DEVELOPER.md#contribute-code
In the paragraph starting with 'Please use idiomatic Clojure style'
For the most part it is place parameters in a separate line from the
function name. Use document strings as needed. Don't have closing ')' on
their own line. I know we don't follow it everywhere, but we are trying to
start.
> 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.2#6252)