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-core] Added exception for emit to undeclared stream
Date Tue, 02 Feb 2016 20:31:50 GMT
Repository: storm
Updated Branches:
  refs/heads/master 02a44c7fc -> d236036f7


[storm-core] Added exception for emit to undeclared stream


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

Branch: refs/heads/master
Commit: 464da009f4c5a49853147ffb188f9eea2669b3ba
Parents: 0957488
Author: mjsax <mjsax@informatik.hu-berlin.de>
Authored: Wed Jan 20 18:34:45 2016 +0100
Committer: mjsax <mjsax@informatik.hu-berlin.de>
Committed: Wed Jan 20 18:37:25 2016 +0100

----------------------------------------------------------------------
 storm-core/src/clj/org/apache/storm/daemon/executor.clj | 2 +-
 storm-core/src/clj/org/apache/storm/daemon/task.clj     | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/464da009/storm-core/src/clj/org/apache/storm/daemon/executor.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/org/apache/storm/daemon/executor.clj b/storm-core/src/clj/org/apache/storm/daemon/executor.clj
index 8052835..6c776c0 100644
--- a/storm-core/src/clj/org/apache/storm/daemon/executor.clj
+++ b/storm-core/src/clj/org/apache/storm/daemon/executor.clj
@@ -142,7 +142,7 @@
                   (.getComponentOutputFields worker-context component-id stream-id)
                   component->grouping
                   topo-conf)]))
-         (into {})
+         (into (apply merge (map #(hash-map % nil) (.keySet (.get_streams (.getComponentCommon
worker-context component-id))))))
          (HashMap.)))
 
 (defn executor-type [^WorkerTopologyContext context component-id]

http://git-wip-us.apache.org/repos/asf/storm/blob/464da009/storm-core/src/clj/org/apache/storm/daemon/task.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/org/apache/storm/daemon/task.clj b/storm-core/src/clj/org/apache/storm/daemon/task.clj
index 1ae9b22..a48646b 100644
--- a/storm-core/src/clj/org/apache/storm/daemon/task.clj
+++ b/storm-core/src/clj/org/apache/storm/daemon/task.clj
@@ -150,6 +150,8 @@
            (when debug?
              (log-message "Emitting: " component-id " " stream " " values))
            (let [out-tasks (ArrayList.)]
+             (if (not (.containsKey stream->component->grouper stream))
+               (throw (IllegalArgumentException. (str "Unknown stream ID: " stream))))
              (fast-map-iter [[out-component grouper] (get stream->component->grouper
stream)]
                (when (= :direct grouper)
                   ;;  TODO: this is wrong, need to check how the stream was declared


Mime
View raw message