storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [1/2] storm git commit: STORM-683: Make false in a conf really evaluate to false in clojure.
Date Mon, 23 Feb 2015 17:03:26 GMT
Repository: storm
Updated Branches:
  refs/heads/master 877e29d0d -> 348d480be


STORM-683: Make false in a conf really evaluate to false in clojure.


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

Branch: refs/heads/master
Commit: b60d0f180d4ebeaae1f1af264f4c126f0f2f6043
Parents: 877e29d
Author: Robert (Bobby) Evans <evans@yahoo-inc.com>
Authored: Fri Feb 20 16:12:02 2015 -0600
Committer: Robert (Bobby) Evans <evans@yahoo-inc.com>
Committed: Mon Feb 23 11:02:24 2015 -0600

----------------------------------------------------------------------
 storm-core/src/clj/backtype/storm/config.clj        | 3 +--
 storm-core/src/clj/backtype/storm/daemon/worker.clj | 2 +-
 storm-core/src/clj/backtype/storm/util.clj          | 3 +++
 3 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/b60d0f18/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 98b1da2..483c6ff 100644
--- a/storm-core/src/clj/backtype/storm/config.clj
+++ b/storm-core/src/clj/backtype/storm/config.clj
@@ -211,8 +211,7 @@
   (let [stormroot (supervisor-stormdist-root conf storm-id)
         conf-path (supervisor-stormconf-path stormroot)
         topology-path (supervisor-stormcode-path stormroot)]
-    (merge conf (Utils/deserialize (FileUtils/readFileToByteArray (File. conf-path))))
-    ))
+    (merge conf (clojurify-structure (Utils/deserialize (FileUtils/readFileToByteArray (File.
conf-path)))))))
 
 (defn read-supervisor-topology
   [conf storm-id]

http://git-wip-us.apache.org/repos/asf/storm/blob/b60d0f18/storm-core/src/clj/backtype/storm/daemon/worker.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/daemon/worker.clj b/storm-core/src/clj/backtype/storm/daemon/worker.clj
index 0a5d984..46ded42 100644
--- a/storm-core/src/clj/backtype/storm/daemon/worker.clj
+++ b/storm-core/src/clj/backtype/storm/daemon/worker.clj
@@ -130,7 +130,7 @@
         local-transfer (:transfer-local-fn worker)
         ^DisruptorQueue transfer-queue (:transfer-queue worker)
         task->node+port (:cached-task->node+port worker)
-        try-serialize-local ((:conf worker) TOPOLOGY-TESTING-ALWAYS-TRY-SERIALIZE)
+        try-serialize-local ((:storm-conf worker) TOPOLOGY-TESTING-ALWAYS-TRY-SERIALIZE)
         transfer-fn
           (fn [^KryoTupleSerializer serializer tuple-batch]
             (let [local (ArrayList.)

http://git-wip-us.apache.org/repos/asf/storm/blob/b60d0f18/storm-core/src/clj/backtype/storm/util.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/util.clj b/storm-core/src/clj/backtype/storm/util.clj
index d67c264..36dc62c 100644
--- a/storm-core/src/clj/backtype/storm/util.clj
+++ b/storm-core/src/clj/backtype/storm/util.clj
@@ -247,6 +247,9 @@
   (prewalk (fn [x]
              (cond (instance? Map x) (into {} x)
                    (instance? List x) (vec x)
+                   ;; (Boolean. false) does not evaluate to false in an if.
+                   ;; This fixes that.
+                   (instance? Boolean x) (boolean x)
                    true x))
            s))
 


Mime
View raw message