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 2014/08/25 19:46:46 UTC

[02/14] git commit: Correcting function formatting

Correcting function formatting


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

Branch: refs/heads/master
Commit: cbb0b8a2970a2094320915934113e4c06a559222
Parents: 0db27d5
Author: Kishor Patil <kp...@yahoo-inc.com>
Authored: Wed Jun 25 15:18:15 2014 +0000
Committer: Kishor Patil <kp...@yahoo-inc.com>
Committed: Wed Jun 25 15:18:15 2014 +0000

----------------------------------------------------------------------
 storm-core/src/clj/backtype/storm/daemon/supervisor.clj | 8 +++++---
 storm-core/src/jvm/backtype/storm/Config.java           | 1 -
 storm-core/test/clj/backtype/storm/supervisor_test.clj  | 8 +++++---
 3 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/cbb0b8a2/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 af88c9d..620ed5a 100644
--- a/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
+++ b/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
@@ -445,12 +445,14 @@
         arch-resource-root (str resource-root File/separator os "-" arch)]
     (str arch-resource-root File/pathSeparator resource-root File/pathSeparator (conf JAVA-LIBRARY-PATH)))) 
 
-(defn substitute-childopts [value worker-id storm-id port]
-  (let [replacement-map {"%ID%"          (str port)
+(defn substitute-childopts 
+  [value worker-id storm-id port]
+  (let [replacement-map {"%ID%"           (str port)
                           "%WORKER-ID%"   (str worker-id)
                           "%STORM-ID%"    (str storm-id)
                           "%WORKER-PORT%" (str port)}
-         sub-fn (fn [s] 
+         sub-fn (fn 
+                  [s] 
                   (reduce (fn [string entry]
                     (apply clojure.string/replace string entry))
                      s replacement-map))]

http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/cbb0b8a2/storm-core/src/jvm/backtype/storm/Config.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/Config.java b/storm-core/src/jvm/backtype/storm/Config.java
index 2b53e27..458502e 100644
--- a/storm-core/src/jvm/backtype/storm/Config.java
+++ b/storm-core/src/jvm/backtype/storm/Config.java
@@ -471,7 +471,6 @@ public class Config extends HashMap<String, Object> {
      * The jvm opts provided to workers launched by this supervisor. All "%ID%" substrings are replaced
      * with an identifier for this worker. Also, "%WORKER-ID%", "%STORM-ID%" and "%WORKER-PORT%" are
      * replaced with appropriate runtime values for this worker.
-     *
      */
     public static final String WORKER_CHILDOPTS = "worker.childopts";
     public static final Object WORKER_CHILDOPTS_SCHEMA = ConfigValidation.StringOrStringListValidator;

http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/cbb0b8a2/storm-core/test/clj/backtype/storm/supervisor_test.clj
----------------------------------------------------------------------
diff --git a/storm-core/test/clj/backtype/storm/supervisor_test.clj b/storm-core/test/clj/backtype/storm/supervisor_test.clj
index b7cb31e..7c397bb 100644
--- a/storm-core/test/clj/backtype/storm/supervisor_test.clj
+++ b/storm-core/test/clj/backtype/storm/supervisor_test.clj
@@ -352,13 +352,15 @@
   ;; TODO just do reassign, and check that cleans up worker states after killing but doesn't get rid of downloaded code
   )
 
-(defn found? [sub-str input-str]
+(defn found? 
+  [sub-str input-str]
   (if (string? input-str)
     (.contains input-str sub-str)
     (some? #(.substring % sub-str) input-str)))
 
-(defn not-found? [sub-str input-str]
-    (complement (found? sub-str input-str)))
+(defn not-found? 
+  [sub-str input-str]
+  (complement (found? sub-str input-str)))
 
 (deftest test-substitute-childopts-happy-path
   (testing "worker-launcher replaces ids in childopts"