Repository: storm
Updated Branches:
  refs/heads/1.0.x-branch bb67ea5d6 -> f2ad7fa71


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/a065187b
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/a065187b
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/a065187b

Branch: refs/heads/1.0.x-branch
Commit: a065187b91a616243fc4fbfc215466bd6aa36dca
Parents: bb67ea5
Author: Alessandro Bellina <abell...@yahoo-inc.com>
Authored: Tue Sep 20 08:33:02 2016 -0500
Committer: Jungtaek Lim <kabh...@gmail.com>
Committed: Fri Sep 23 10:40:31 2016 +0900

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


http://git-wip-us.apache.org/repos/asf/storm/blob/a065187b/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 00d8fa6..e55e7eb 100644
--- a/storm-core/src/clj/org/apache/storm/daemon/nimbus.clj
+++ b/storm-core/src/clj/org/apache/storm/daemon/nimbus.clj
@@ -641,14 +641,16 @@
         storm-conf (read-storm-conf-as-nimbus storm-id blob-store)
         topology (read-storm-topology-as-nimbus storm-id blob-store)
         task->component (storm-task-info topology storm-conf)]
-    (->> (storm-task-info topology storm-conf)
-         reverse-map
-         (map-val sort)
-         (join-maps component->executors)
-         (map-val (partial apply partition-fixed))
-         (mapcat second)
-         (map to-executor-id)
-         )))
+    (if (nil? component->executors)
+      []
+      (->> (storm-task-info topology storm-conf)
+           reverse-map
+           (map-val sort)
+           (join-maps component->executors)
+           (map-val (partial apply partition-fixed))
+           (mapcat second)
+           (map to-executor-id)
+           ))))
 
 (defn- compute-executor->component [nimbus storm-id]
   (let [conf (:conf nimbus)

Reply via email to