Repository: storm
Updated Branches:
  refs/heads/1.x-branch 11f23153a -> dc006daae


[STORM-1667] Log the IO exception when deleting worker pid dir


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

Branch: refs/heads/1.x-branch
Commit: c54162418a4a46d99ac360661f78cc5e10cb654a
Parents: 652d2f6
Author: zhuol <[email protected]>
Authored: Wed Mar 30 17:21:41 2016 -0500
Committer: zhuol <[email protected]>
Committed: Wed Mar 30 17:21:41 2016 -0500

----------------------------------------------------------------------
 .../src/clj/org/apache/storm/daemon/supervisor.clj     | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/c5416241/storm-core/src/clj/org/apache/storm/daemon/supervisor.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/org/apache/storm/daemon/supervisor.clj 
b/storm-core/src/clj/org/apache/storm/daemon/supervisor.clj
index 7be1421..ced8e7e 100644
--- a/storm-core/src/clj/org/apache/storm/daemon/supervisor.clj
+++ b/storm-core/src/clj/org/apache/storm/daemon/supervisor.clj
@@ -269,10 +269,7 @@
   (catch IOException e
     (log-warn-error e "Failed to cleanup worker " id ". Will retry later"))
   (catch RuntimeException e
-    (log-warn-error e "Failed to cleanup worker " id ". Will retry later")
-    )
-  (catch java.io.FileNotFoundException e (log-message (.getMessage e)))
-    ))
+    (log-warn-error e "Failed to cleanup worker " id ". Will retry later"))))
 
 (defn shutdown-worker [supervisor id]
   (log-message "Shutting down " (:supervisor-id supervisor) ":" id)
@@ -296,11 +293,15 @@
         (worker-launcher-and-wait conf user ["signal" pid "9"] :log-prefix 
(str "kill -9 " pid))
         (force-kill-process pid))
       (if as-user
-        (rmr-as-user conf id (worker-pid-path conf id pid))
         (try
+          (rmr-as-user conf id (worker-pid-path conf id pid))
           (rmpath (worker-pid-path conf id pid))
           (rmpath (worker-tmp-root conf id pid))
-          (catch Exception e)))) ;; on windows, the supervisor may still holds 
the lock on the worker directory
+          (catch IOException e
+            (log-warn-error e "Failed to cleanup pid dir: " pid " for worker " 
id". Will retry later"))
+          (catch RuntimeException e
+            (log-warn-error e "Failed to cleanup pid dir: " pid " for worker " 
id". Will retry later")))))
+          ;; on windows, the supervisor may still holds the lock on the worker 
directory
     (try-cleanup-worker conf id))
   (log-message "Shut down " (:supervisor-id supervisor) ":" id))
 

Reply via email to