You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2015/11/11 22:24:10 UTC
[05/10] storm git commit: Update health check to use absolute dir
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 <tg...@decadefade.corp.ne1.yahoo.com>
Authored: Thu Nov 5 18:53:03 2015 +0000
Committer: Thomas Graves <tg...@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")]