storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [4/6] storm git commit: STORM-657:use when-not in supervisor.shutdown-worker
Date Wed, 11 Mar 2015 20:10:15 GMT
STORM-657:use when-not in supervisor.shutdown-worker


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/1d9b2837
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/1d9b2837
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/1d9b2837

Branch: refs/heads/master
Commit: 1d9b28373faeb4a4d7b9017d8ffd130f3397b052
Parents: b1c993b
Author: caofangkun <caofangkun@gmail.com>
Authored: Thu Feb 12 09:25:05 2015 +0800
Committer: caofangkun <caofangkun@gmail.com>
Committed: Thu Feb 12 09:25:05 2015 +0800

----------------------------------------------------------------------
 storm-core/src/clj/backtype/storm/daemon/supervisor.clj | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/1d9b2837/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/daemon/supervisor.clj b/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
index 7764310..36f7a8a 100644
--- a/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
+++ b/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
@@ -258,9 +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) (do 
-                            (log-message "Sleep " shutdown-sleep-secs " seconds for execution
of cleanup threads on worker.")
-                            (sleep-secs shutdown-sleep-secs)))
+    (when-not (empty? pids)  
+      (log-message "Sleep " shutdown-sleep-secs " seconds for execution of cleanup threads
on worker.")
+      (sleep-secs shutdown-sleep-secs))
     (doseq [pid pids]
       (if as-user
         (worker-launcher-and-wait conf user ["signal" pid "9"] :log-prefix (str "kill -9
" pid))


Mime
View raw message