storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kabh...@apache.org
Subject [01/10] storm git commit: create logs metadata dir when running securely
Date Tue, 04 Aug 2015 06:21:20 GMT
Repository: storm
Updated Branches:
  refs/heads/0.10.x-branch f28506686 -> ac0ae4aad


create logs metadata dir when running securely


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

Branch: refs/heads/0.10.x-branch
Commit: 55f8b28f293a51d144e184396bed00b864b459ab
Parents: f285066
Author: Derek Dagit <derekd@yahoo-inc.com>
Authored: Tue Jun 9 18:31:38 2015 -0500
Committer: Jungtaek Lim <kabhwan@gmail.com>
Committed: Tue Aug 4 13:06:36 2015 +0900

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


http://git-wip-us.apache.org/repos/asf/storm/blob/55f8b28f/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 ba83a7e..2b19596 100644
--- a/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
+++ b/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
@@ -596,9 +596,11 @@
   (let [file (get-log-metadata-file storm-id port)]
     ;;run worker as user needs the directory to have special permissions
     ;; or it is insecure
-    (when (and (not (conf SUPERVISOR-RUN-WORKER-AS-USER))
-               (not (.exists (.getParentFile file))))
-      (.mkdirs (.getParentFile file)))
+    (when (not (.exists (.getParentFile file)))
+      (if (conf SUPERVISOR-RUN-WORKER-AS-USER)
+        (do (FileUtils/forceMkdir (.getParentFile file))
+            (setup-storm-code-dir conf (read-supervisor-storm-conf conf storm-id) (.getCanonicalPath
(.getParentFile file))))
+        (.mkdirs (.getParentFile file))))
     (let [writer (java.io.FileWriter. file)
         yaml (Yaml.)]
       (try


Mime
View raw message