[1/3] storm git commit: STORM-2101: fixes npe in compute-executors in nimbus
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 Authored: Tue Sep 20 08:33:02 2016 -0500 Committer: Jungtaek Lim 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)
[1/3] storm git commit: STORM-2101: fixes npe in compute-executors in nimbus
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 Authored: Mon Sep 19 13:33:37 2016 -0500 Committer: Alessandro Bellina 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)
[1/3] storm git commit: STORM-2101: fixes npe in compute-executors in nimbus
Repository: storm Updated Branches: refs/heads/1.x-branch 2aa33e8d2 -> 43653ac8d 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/04328319 Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/04328319 Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/04328319 Branch: refs/heads/1.x-branch Commit: 04328319a0aa284e396d7f7419ff881426e6b8f0 Parents: 58cbfe5 Author: Alessandro Bellina Authored: Tue Sep 20 08:33:02 2016 -0500 Committer: Alessandro Bellina Committed: Tue Sep 20 08:33:02 2016 -0500 -- .../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/04328319/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 03bb291..793a354 100644 --- a/storm-core/src/clj/org/apache/storm/daemon/nimbus.clj +++ b/storm-core/src/clj/org/apache/storm/daemon/nimbus.clj @@ -656,14 +656,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)