storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [05/10] storm git commit: Update health check to use absolute dir
Date Wed, 11 Nov 2015 21:24:10 GMT
Update health check to use absolute dir


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

Branch: refs/heads/master
Commit: be9799e4f43d6721e08a3ceab18df9c6ae34cd3b
Parents: b1fca5e
Author: Thomas Graves <tgraves@decadefade.corp.ne1.yahoo.com>
Authored: Thu Nov 5 18:53:03 2015 +0000
Committer: Thomas Graves <tgraves@decadefade.corp.ne1.yahoo.com>
Committed: Thu Nov 5 18:53:03 2015 +0000

----------------------------------------------------------------------
 storm-core/src/clj/backtype/storm/command/healthcheck.clj | 2 +-
 storm-core/src/clj/backtype/storm/config.clj              | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/be9799e4/storm-core/src/clj/backtype/storm/command/healthcheck.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/command/healthcheck.clj b/storm-core/src/clj/backtype/storm/command/healthcheck.clj
index 070e9ff..14af223 100644
--- a/storm-core/src/clj/backtype/storm/command/healthcheck.clj
+++ b/storm-core/src/clj/backtype/storm/command/healthcheck.clj
@@ -60,7 +60,7 @@
       (finally (.interrupt interrupter-thread)))))
 
 (defn health-check [conf]
-  (let [health-dir (conf STORM-HEALTH-CHECK-DIR)
+  (let [health-dir (absolute-healthcheck-dir conf)
         health-files (file-seq (io/file health-dir))
         health-scripts (filter #(and (.canExecute %)
                                      (not (.isDirectory %)))

http://git-wip-us.apache.org/repos/asf/storm/blob/be9799e4/storm-core/src/clj/backtype/storm/config.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/config.clj b/storm-core/src/clj/backtype/storm/config.clj
index f06f6e9..c052aa2 100644
--- a/storm-core/src/clj/backtype/storm/config.clj
+++ b/storm-core/src/clj/backtype/storm/config.clj
@@ -94,6 +94,13 @@
       (if (is-absolute-path? path) path (str storm-home file-path-separator path))
       (str storm-home file-path-separator "storm-local"))))
 
+(defn absolute-healthcheck-dir [conf]
+  (let [storm-home (System/getProperty "storm.home")
+        path (conf STORM-HEALTH-CHECK-DIR)]
+    (if path
+      (if (is-absolute-path? path) path (str storm-home file-path-separator path))
+      (str storm-home file-path-separator "healthchecks"))))
+
 (defn master-local-dir
   [conf]
   (let [ret (str (absolute-storm-local-dir conf) file-path-separator "nimbus")]


Mime
View raw message