storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kabh...@apache.org
Subject [1/3] storm git commit: STORM-2389 Avoid instantiating Event Logger when topology.eventlogger.executors=0
Date Sat, 04 Mar 2017 02:29:10 GMT
Repository: storm
Updated Branches:
  refs/heads/1.0.x-branch ff427212b -> b03e64af5


STORM-2389 Avoid instantiating Event Logger when topology.eventlogger.executors=0


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

Branch: refs/heads/1.0.x-branch
Commit: c836bcd9516ba9ec43759fe3abd0d0d82840603d
Parents: ff42721
Author: Jungtaek Lim <kabhwan@gmail.com>
Authored: Thu Mar 2 18:54:18 2017 +0900
Committer: Jungtaek Lim <kabhwan@gmail.com>
Committed: Sat Mar 4 11:28:25 2017 +0900

----------------------------------------------------------------------
 .../src/clj/org/apache/storm/daemon/common.clj       | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/c836bcd9/storm-core/src/clj/org/apache/storm/daemon/common.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/org/apache/storm/daemon/common.clj b/storm-core/src/clj/org/apache/storm/daemon/common.clj
index 74f2dac..4d1f0a9 100644
--- a/storm-core/src/clj/org/apache/storm/daemon/common.clj
+++ b/storm-core/src/clj/org/apache/storm/daemon/common.clj
@@ -348,11 +348,18 @@
                           :conf {TOPOLOGY-TASKS 0})]
     (.put_to_bolts topology SYSTEM-COMPONENT-ID system-bolt-spec)))
 
+(defn has-ackers? [storm-conf]
+  (or (nil? (storm-conf TOPOLOGY-ACKER-EXECUTORS)) (> (storm-conf TOPOLOGY-ACKER-EXECUTORS)
0)))
+
+(defn has-eventloggers? [storm-conf]
+  (or (nil? (storm-conf TOPOLOGY-EVENTLOGGER-EXECUTORS)) (> (storm-conf TOPOLOGY-EVENTLOGGER-EXECUTORS)
0)))
+
 (defn system-topology! [storm-conf ^StormTopology topology]
   (validate-basic! topology)
   (let [ret (.deepCopy topology)]
     (add-acker! storm-conf ret)
-    (add-eventlogger! storm-conf ret)
+    (if (has-eventloggers? storm-conf)
+      (add-eventlogger! storm-conf ret))
     (add-metric-components! storm-conf ret)
     (add-system-components! storm-conf ret)
     (add-metric-streams! ret)
@@ -361,12 +368,6 @@
     ret
     ))
 
-(defn has-ackers? [storm-conf]
-  (or (nil? (storm-conf TOPOLOGY-ACKER-EXECUTORS)) (> (storm-conf TOPOLOGY-ACKER-EXECUTORS)
0)))
-
-(defn has-eventloggers? [storm-conf]
-  (or (nil? (storm-conf TOPOLOGY-EVENTLOGGER-EXECUTORS)) (> (storm-conf TOPOLOGY-EVENTLOGGER-EXECUTORS)
0)))
-
 (defn num-start-executors [component]
   (thrift/parallelism-hint (.get_common component)))
 


Mime
View raw message