You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by Parth-Brahmbhatt <gi...@git.apache.org> on 2014/06/13 01:02:40 UTC
[GitHub] incubator-storm pull request: STORM-183: supervisor and worker sho...
GitHub user Parth-Brahmbhatt opened a pull request:
https://github.com/apache/incubator-storm/pull/139
STORM-183: supervisor and worker should rugister with runtime for shutd...
...own hooks. Supervisors should use kill -15 before kill -9 to allow workers to perform cleanup.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/Parth-Brahmbhatt/incubator-storm STORM-183
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-storm/pull/139.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #139
----
commit f15714c0a8342147c9cfe4410c86c0a325d30a4b
Author: Parth-Brahmbhatt <pb...@hw10960.local>
Date: 2014-06-12T22:54:34Z
STORM-183: supervisor and worker should rugister with runtime for shutdown hooks. Supervisors should use kill -15 before kill -9 to allow workers to perform cleanup.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-storm pull request: STORM-183: supervisor and worker sho...
Posted by ptgoetz <gi...@git.apache.org>.
Github user ptgoetz commented on the pull request:
https://github.com/apache/incubator-storm/pull/139#issuecomment-46244421
Yes, just prefix the title with the JIRA ID.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-storm pull request: STORM-183: supervisor and worker sho...
Posted by revans2 <gi...@git.apache.org>.
Github user revans2 commented on a diff in the pull request:
https://github.com/apache/incubator-storm/pull/139#discussion_r13765591
--- Diff: storm-core/src/clj/backtype/storm/daemon/worker.clj ---
@@ -448,4 +448,6 @@
(defn -main [storm-id assignment-id port-str worker-id]
(let [conf (read-storm-config)]
(validate-distributed-mode! conf)
- (mk-worker conf nil storm-id assignment-id (Integer/parseInt port-str) worker-id)))
+ (.addShutdownHook (Runtime/getRuntime)
--- End diff --
I'm not sure that this shutdown hook will be called in all cases. Most places the worker code calls Runtime.halt on error, which does not call any of the shutdown hooks. It just exits. I think that was done because shutdown hooks can lock up, and if they do the process does not exit. So we could get zombie processes. Typically I have seen this addressed by installing a shutdown hook that will let the other shutdown hooks run for a maximum amount of time, at which point it calls Runtime.halt.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-storm pull request: STORM-183: supervisor and worker sho...
Posted by Parth-Brahmbhatt <gi...@git.apache.org>.
Github user Parth-Brahmbhatt commented on the pull request:
https://github.com/apache/incubator-storm/pull/139#issuecomment-46241965
closed this one, not sure what you mean by add STORM-183, do you mean adding "STORM-183" text as prefix to pull request and commit message?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-storm pull request: STORM-183: supervisor and worker sho...
Posted by revans2 <gi...@git.apache.org>.
Github user revans2 commented on a diff in the pull request:
https://github.com/apache/incubator-storm/pull/139#discussion_r13763330
--- 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 --
With the new coding guidelines, could you put the parameter list on a separate line?
```
(defn send-signal-to-process
[pid signum]
...)
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-storm pull request: STORM-183: supervisor and worker sho...
Posted by Parth-Brahmbhatt <gi...@git.apache.org>.
Github user Parth-Brahmbhatt commented on a diff in the pull request:
https://github.com/apache/incubator-storm/pull/139#discussion_r13766558
--- 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 --
adding this, can you also point me to the guidelines you are referring to.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-storm pull request: STORM-183: supervisor and worker sho...
Posted by Parth-Brahmbhatt <gi...@git.apache.org>.
Github user Parth-Brahmbhatt closed the pull request at:
https://github.com/apache/incubator-storm/pull/139
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-storm pull request: STORM-183: supervisor and worker sho...
Posted by Parth-Brahmbhatt <gi...@git.apache.org>.
Github user Parth-Brahmbhatt commented on the pull request:
https://github.com/apache/incubator-storm/pull/139#issuecomment-46065430
addressed comments , Would appreciate any suggestions for a better and less verbose name for function add-shutdown-hook-with-force-kill-in-1-sec.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-storm pull request: STORM-183: supervisor and worker sho...
Posted by revans2 <gi...@git.apache.org>.
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.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-storm pull request: STORM-183: supervisor and worker sho...
Posted by revans2 <gi...@git.apache.org>.
Github user revans2 commented on the pull request:
https://github.com/apache/incubator-storm/pull/139#issuecomment-46241120
Could you close this pull request then, and add STORM-183 to the other one?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-storm pull request: STORM-183: supervisor and worker sho...
Posted by Parth-Brahmbhatt <gi...@git.apache.org>.
Github user Parth-Brahmbhatt commented on the pull request:
https://github.com/apache/incubator-storm/pull/139#issuecomment-46238986
Ran into some weird git issues so just forked off a new repo and created a new pull request, https://github.com/apache/incubator-storm/pull/143. The fork was created like an hour ago so should not have any merge conflicts. I can merge to my master if it makes any easier for you to review.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-storm pull request: STORM-183: supervisor and worker sho...
Posted by revans2 <gi...@git.apache.org>.
Github user revans2 commented on the pull request:
https://github.com/apache/incubator-storm/pull/139#issuecomment-46197891
There are a number of merge conflicts now. Could you please upmerge to master.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-storm pull request: STORM-183: supervisor and worker sho...
Posted by Parth-Brahmbhatt <gi...@git.apache.org>.
Github user Parth-Brahmbhatt commented on the pull request:
https://github.com/apache/incubator-storm/pull/139#issuecomment-46036698
Some changes were not pushed with the last commit so pushed them and resending now.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---