storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srihar...@apache.org
Subject [1/2] storm git commit: STORM-496. task.clj missing debug for logging spout and bolt emit values.
Date Sun, 08 Mar 2015 17:52:08 GMT
Repository: storm
Updated Branches:
  refs/heads/master 9f57ba9bb -> 9517923b1


STORM-496. task.clj missing debug for logging spout and bolt emit values.


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

Branch: refs/heads/master
Commit: 3193307777b3155dc1524af0316aee139f349b23
Parents: 182a734
Author: Sriharsha Chintalapani <mail@harsha.io>
Authored: Thu Feb 26 08:02:25 2015 -0800
Committer: Sriharsha Chintalapani <mail@harsha.io>
Committed: Thu Feb 26 08:02:25 2015 -0800

----------------------------------------------------------------------
 storm-core/src/clj/backtype/storm/daemon/task.clj | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/31933077/storm-core/src/clj/backtype/storm/daemon/task.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/daemon/task.clj b/storm-core/src/clj/backtype/storm/daemon/task.clj
index b037d21..da4abb3 100644
--- a/storm-core/src/clj/backtype/storm/daemon/task.clj
+++ b/storm-core/src/clj/backtype/storm/daemon/task.clj
@@ -132,9 +132,12 @@
         emit-sampler (mk-stats-sampler storm-conf)
         stream->component->grouper (:stream->component->grouper executor-data)
         user-context (:user-context task-data)
-        executor-stats (:stats executor-data)]
+        executor-stats (:stats executor-data)
+        debug? (= true (storm-conf TOPOLOGY-DEBUG))]
         
     (fn ([^Integer out-task-id ^String stream ^List values]
+          (when debug?
+            (log-message "Emitting direct: " out-task-id "; " component-id " " stream " "
values))
           (let [target-component (.getComponentId worker-context out-task-id)
                 component->grouping (get stream->component->grouper stream)
                 grouping (get component->grouping target-component)
@@ -151,6 +154,8 @@
             (if out-task-id [out-task-id])
             ))
         ([^String stream ^List values]
+           (when debug?
+             (log-message "Emitting: " component-id " " stream " " values))
            (let [out-tasks (ArrayList.)]
              (fast-map-iter [[out-component grouper] (get stream->component->grouper
stream)]
                (when (= :direct grouper)


Mime
View raw message