[jira] [Commented] (STORM-657) make the shutdown-worker sleep time before kill -9 configurable
[ https://issues.apache.org/jira/browse/STORM-657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14357494#comment-14357494 ] ASF GitHub Bot commented on STORM-657: -- Github user revans2 commented on the pull request: https://github.com/apache/storm/pull/421#issuecomment-78360046 +1 > make the shutdown-worker sleep time before kill -9 configurable > --- > > Key: STORM-657 > URL: https://issues.apache.org/jira/browse/STORM-657 > Project: Apache Storm > Issue Type: Improvement >Affects Versions: 0.9.2-incubating, 0.10.0 >Reporter: Vincent Russell >Assignee: caofangkun >Priority: Minor > > This is a continuation of STORM-183: Supervisor/worker shutdown hook should > be called in distributed mode. > It would be nice to be able to configure how many seconds (or millis) to > sleep for before shutting down the worker process in the shutdown-worker > function in supervisor.clj -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (STORM-657) make the shutdown-worker sleep time before kill -9 configurable
[ https://issues.apache.org/jira/browse/STORM-657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14357499#comment-14357499 ] ASF GitHub Bot commented on STORM-657: -- Github user asfgit closed the pull request at: https://github.com/apache/storm/pull/421 > make the shutdown-worker sleep time before kill -9 configurable > --- > > Key: STORM-657 > URL: https://issues.apache.org/jira/browse/STORM-657 > Project: Apache Storm > Issue Type: Improvement >Affects Versions: 0.9.2-incubating, 0.10.0 >Reporter: Vincent Russell >Assignee: caofangkun >Priority: Minor > > This is a continuation of STORM-183: Supervisor/worker shutdown hook should > be called in distributed mode. > It would be nice to be able to configure how many seconds (or millis) to > sleep for before shutting down the worker process in the shutdown-worker > function in supervisor.clj -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (STORM-657) make the shutdown-worker sleep time before kill -9 configurable
[ https://issues.apache.org/jira/browse/STORM-657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14317349#comment-14317349 ] ASF GitHub Bot commented on STORM-657: -- Github user caofangkun commented on a diff in the pull request: https://github.com/apache/storm/pull/421#discussion_r24551687 --- Diff: storm-core/src/clj/backtype/storm/daemon/supervisor.clj --- @@ -257,7 +258,9 @@ (if as-user (worker-launcher-and-wait conf user ["signal" pid "9"] :log-prefix (str "kill -15 " pid)) (kill-process-with-sig-term pid))) -(if-not (empty? pids) (sleep-secs 1)) ;; allow 1 second for execution of cleanup threads on worker. +(if-not (empty? pids) (do +(log-message "Sleep " shutdown-sleep-secs " seconds for execution of cleanup threads on worker.") +(sleep-secs shutdown-sleep-secs))) --- End diff -- @knusbaum Fixed. Thank you. > make the shutdown-worker sleep time before kill -9 configurable > --- > > Key: STORM-657 > URL: https://issues.apache.org/jira/browse/STORM-657 > Project: Apache Storm > Issue Type: Improvement >Affects Versions: 0.9.2-incubating, 0.10.0 >Reporter: Vincent Russell >Assignee: caofangkun >Priority: Minor > > This is a continuation of STORM-183: Supervisor/worker shutdown hook should > be called in distributed mode. > It would be nice to be able to configure how many seconds (or millis) to > sleep for before shutting down the worker process in the shutdown-worker > function in supervisor.clj -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (STORM-657) make the shutdown-worker sleep time before kill -9 configurable
[ https://issues.apache.org/jira/browse/STORM-657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14316608#comment-14316608 ] ASF GitHub Bot commented on STORM-657: -- Github user knusbaum commented on the pull request: https://github.com/apache/storm/pull/421#issuecomment-73925638 +1 I don't see any problems with this. > make the shutdown-worker sleep time before kill -9 configurable > --- > > Key: STORM-657 > URL: https://issues.apache.org/jira/browse/STORM-657 > Project: Apache Storm > Issue Type: Improvement >Affects Versions: 0.9.2-incubating, 0.10.0 >Reporter: Vincent Russell >Assignee: caofangkun >Priority: Minor > > This is a continuation of STORM-183: Supervisor/worker shutdown hook should > be called in distributed mode. > It would be nice to be able to configure how many seconds (or millis) to > sleep for before shutting down the worker process in the shutdown-worker > function in supervisor.clj -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (STORM-657) make the shutdown-worker sleep time before kill -9 configurable
[ https://issues.apache.org/jira/browse/STORM-657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14316602#comment-14316602 ] ASF GitHub Bot commented on STORM-657: -- Github user knusbaum commented on a diff in the pull request: https://github.com/apache/storm/pull/421#discussion_r24514568 --- Diff: storm-core/src/clj/backtype/storm/daemon/supervisor.clj --- @@ -257,7 +258,9 @@ (if as-user (worker-launcher-and-wait conf user ["signal" pid "9"] :log-prefix (str "kill -15 " pid)) (kill-process-with-sig-term pid))) -(if-not (empty? pids) (sleep-secs 1)) ;; allow 1 second for execution of cleanup threads on worker. +(if-not (empty? pids) (do +(log-message "Sleep " shutdown-sleep-secs " seconds for execution of cleanup threads on worker.") +(sleep-secs shutdown-sleep-secs))) --- End diff -- To clean this up a tiny bit, this can be: ```clojure (when-not (empty? pids) (log-message ...) (sleep-secs ...)) ``` > make the shutdown-worker sleep time before kill -9 configurable > --- > > Key: STORM-657 > URL: https://issues.apache.org/jira/browse/STORM-657 > Project: Apache Storm > Issue Type: Improvement >Affects Versions: 0.9.2-incubating, 0.10.0 >Reporter: Vincent Russell >Assignee: caofangkun >Priority: Minor > > This is a continuation of STORM-183: Supervisor/worker shutdown hook should > be called in distributed mode. > It would be nice to be able to configure how many seconds (or millis) to > sleep for before shutting down the worker process in the shutdown-worker > function in supervisor.clj -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (STORM-657) make the shutdown-worker sleep time before kill -9 configurable
[ https://issues.apache.org/jira/browse/STORM-657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14316528#comment-14316528 ] ASF GitHub Bot commented on STORM-657: -- Github user knusbaum commented on a diff in the pull request: https://github.com/apache/storm/pull/421#discussion_r24511333 --- Diff: storm-core/src/clj/backtype/storm/daemon/supervisor.clj --- @@ -257,7 +258,9 @@ (if as-user (worker-launcher-and-wait conf user ["signal" pid "9"] :log-prefix (str "kill -15 " pid)) (kill-process-with-sig-term pid))) -(if-not (empty? pids) (sleep-secs 1)) ;; allow 1 second for execution of cleanup threads on worker. +(if-not (empty? pids) (do +(log-message "Sleep " shutdown-sleep-secs " seconds for execution of cleanup threads on worker.") +(sleep-secs shutdown-sleep-secs))) --- End diff -- To clean this up a tiny bit, this can be: ```clojure (when-not (empty? pids) (log-message ...) (sleep-secs ...)) ``` > make the shutdown-worker sleep time before kill -9 configurable > --- > > Key: STORM-657 > URL: https://issues.apache.org/jira/browse/STORM-657 > Project: Apache Storm > Issue Type: Improvement >Affects Versions: 0.9.2-incubating, 0.10.0 >Reporter: Vincent Russell >Assignee: caofangkun >Priority: Minor > > This is a continuation of STORM-183: Supervisor/worker shutdown hook should > be called in distributed mode. > It would be nice to be able to configure how many seconds (or millis) to > sleep for before shutting down the worker process in the shutdown-worker > function in supervisor.clj -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (STORM-657) make the shutdown-worker sleep time before kill -9 configurable
[ https://issues.apache.org/jira/browse/STORM-657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14311811#comment-14311811 ] ASF GitHub Bot commented on STORM-657: -- GitHub user caofangkun opened a pull request: https://github.com/apache/storm/pull/421 STORM-657:make the shutdown-worker sleep time before kill -9 configurable * add config ``` $vim $STORM_CONF_DIR/storm.yaml supervisor.worker.shutdown.sleep.secs: 5 ``` * Restart Supervisor Process. * submit topology ``` $ storm jar storm-starter-0.10.0-SNAPSHOT.jar storm.starter.ExclamationTopology ExclamationTopology ``` * Kill Topology ``` $ storm kill ExclamationTopology ``` * check the log ``` $ tail -100f supervisor.log 2015-02-09T13:17:34.043+0800 b.s.config [INFO] GET worker-user 6028cc32-f617-40f5-b0fc-1571481d38ec 2015-02-09T13:17:34.054+0800 b.s.d.supervisor [INFO] Sleep 5 seconds for execution of cleanup threads on worker. 2015-02-09T13:17:35.426+0800 b.s.d.supervisor [INFO] Worker Process 6028cc32-f617-40f5-b0fc-1571481d38ec exited with code: 20 2015-02-09T13:17:39.069+0800 b.s.util [INFO] Error when trying to kill 12583. Process is probably already dead. 2015-02-09T13:17:39.077+0800 b.s.config [INFO] REMOVE worker-user 6028cc32-f617-40f5-b0fc-1571481d38ec 2015-02-09T13:17:39.078+0800 b.s.d.supervisor [INFO] Shut down d794f4df-d8e7-46f6-9bad-7698308f4d83:6028cc32-f617-40f5-b0fc-1571481d38ec 2015-02-09T13:17:39.079+0800 b.s.d.supervisor [INFO] Shutting down and clearing state for id d1da554d-3da4-480f-bad7-64c2c00c7d09. Current supervisor time: 1423459048. State: :disallowed, Heartbeat: #backtype.storm.daemon.common.WorkerHeartbeat{:time-secs 1423459048, :storm-id "ExclamationTopology-3-1423458925", :executors #{[7 7] [1 1] [-1 -1] [16 16] [13 13] [10 10] [4 4]}, :port 6700} 2015-02-09T13:17:39.079+0800 b.s.d.supervisor [INFO] Shutting down d794f4df-d8e7-46f6-9bad-7698308f4d83:d1da554d-3da4-480f-bad7-64c2c00c7d09 ``` You can merge this pull request into a Git repository by running: $ git pull https://github.com/caofangkun/apache-storm storm-657 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/storm/pull/421.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 #421 commit 6c04e1bea802d28ae92a234ddbaad2c1ed0a6835 Author: caofangkun Date: 2015-01-23T01:28:46Z Merge pull request #4 from apache/master Merger from apache/storm to caofangkun/apache-storm commit d8c98cb1846bd07aef558bde410607b923aa5c1e Author: caofangkun Date: 2015-02-04T01:09:22Z Merge pull request #5 from apache/master Merge from apache/storm to caofangkun/apache-storm commit b1c993b288385f637fa26b840a11532c7b60a6c7 Author: caofangkun Date: 2015-02-09T05:23:23Z STORM-657:make the shutdown-worker sleep time before kill -9 configurable > make the shutdown-worker sleep time before kill -9 configurable > --- > > Key: STORM-657 > URL: https://issues.apache.org/jira/browse/STORM-657 > Project: Apache Storm > Issue Type: Improvement >Affects Versions: 0.9.2-incubating >Reporter: Vincent Russell >Priority: Minor > Fix For: 0.9.2-incubating > > > This is a continuation of STORM-183: Supervisor/worker shutdown hook should > be called in distributed mode. > It would be nice to be able to configure how many seconds (or millis) to > sleep for before shutting down the worker process in the shutdown-worker > function in supervisor.clj -- This message was sent by Atlassian JIRA (v6.3.4#6332)