Repository: storm
Updated Branches:
  refs/heads/master 73640f0c7 -> 3a1607038


STORM-2101: fixes npe in compute-executors in nimbus


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

Branch: refs/heads/master
Commit: b0944100e339f6d28c6c7bb936bef8ebb1948d89
Parents: cd5c9e8
Author: Alessandro Bellina <abell...@yahoo-inc.com>
Authored: Mon Sep 19 13:33:37 2016 -0500
Committer: Alessandro Bellina <abell...@yahoo-inc.com>
Committed: Tue Sep 20 08:21:15 2016 -0500

----------------------------------------------------------------------
 .../src/clj/org/apache/storm/daemon/nimbus.clj  | 21 ++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/b0944100/storm-core/src/clj/org/apache/storm/daemon/nimbus.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/org/apache/storm/daemon/nimbus.clj 
b/storm-core/src/clj/org/apache/storm/daemon/nimbus.clj
index 76b3917..3938990 100644
--- a/storm-core/src/clj/org/apache/storm/daemon/nimbus.clj
+++ b/storm-core/src/clj/org/apache/storm/daemon/nimbus.clj
@@ -637,16 +637,17 @@
         storm-conf (read-storm-conf-as-nimbus storm-id blob-store)
         topology (read-storm-topology-as-nimbus storm-id blob-store)
         task->component (get-clojurified-task-info topology storm-conf)]
-    (->> (StormCommon/stormTaskInfo topology storm-conf)
-         (Utils/reverseMap)
-         clojurify-structure
-         (map-val sort)
-         ((fn [ & maps ] (Utils/joinMaps (into-array Map (into 
[component->executors] maps)))))
-         (clojurify-structure)
-         (map-val (partial apply (fn part-fixed [a b] (Utils/partitionFixed a 
b))))
-         (mapcat second)
-         (map to-executor-id)
-         )))
+    (if (nil? component->executors)
+      []
+      (->> (StormCommon/stormTaskInfo topology storm-conf)
+           (Utils/reverseMap)
+           clojurify-structure
+           (map-val sort)
+           ((fn [ & maps ] (Utils/joinMaps (into-array Map (into 
[component->executors] maps)))))
+           (clojurify-structure)
+           (map-val (partial apply (fn part-fixed [a b] (Utils/partitionFixed 
a b))))
+           (mapcat second)
+           (map to-executor-id)))))
 
 (defn- compute-executor->component [nimbus storm-id]
   (let [conf (:conf nimbus)

Reply via email to