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 <abell...@yahoo-inc.com> Authored: Tue Sep 20 08:33:02 2016 -0500 Committer: Alessandro Bellina <abell...@yahoo-inc.com> 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)