Repository: storm
Updated Branches:
  refs/heads/master 4a9278630 -> 40b115f1d


STORM-1539 - Improve Storm ACK-ing performance


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

Branch: refs/heads/master
Commit: d110b1f95d8f07b8a2c825885fc6bfa94af7a705
Parents: 12ceb09
Author: Roshan Naik <[email protected]>
Authored: Fri Feb 12 14:57:54 2016 -0800
Committer: Roshan Naik <[email protected]>
Committed: Fri Feb 12 14:57:54 2016 -0800

----------------------------------------------------------------------
 storm-core/src/clj/org/apache/storm/daemon/executor.clj | 6 +-----
 storm-core/src/jvm/org/apache/storm/utils/Utils.java    | 8 ++++++++
 2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/d110b1f9/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 e2380b7..e01311b 100644
--- a/storm-core/src/clj/org/apache/storm/daemon/executor.clj
+++ b/storm-core/src/clj/org/apache/storm/daemon/executor.clj
@@ -498,10 +498,6 @@
           EVENTLOGGER-STREAM-ID
           [component-id message-id (System/currentTimeMillis) values]))))
 
-(defn- bit-xor-vals
-  [vals]
-  (reduce bit-xor 0 vals))
-
 (defmethod mk-threads :spout [executor-data task-datas initial-credentials]
   (let [{:keys [storm-conf component-id worker-context transfer-fn 
report-error sampler open-or-prepare-was-called?]} executor-data
         ^ISpoutWaitStrategy spout-wait-strategy (init-spout-wait-strategy 
storm-conf)
@@ -589,7 +585,7 @@
                                                                                
         (if (sampler) (System/currentTimeMillis))])
                                                                  
(task/send-unanchored task-data
                                                                                
        ACKER-INIT-STREAM-ID
-                                                                               
        [root-id (bit-xor-vals out-ids) task-id]))
+                                                                               
        [root-id (Utils/bitXorVals out-ids) task-id]))
                                                                (when message-id
                                                                  
(ack-spout-msg executor-data task-data message-id
                                                                                
 {:stream out-stream-id :values values}

http://git-wip-us.apache.org/repos/asf/storm/blob/d110b1f9/storm-core/src/jvm/org/apache/storm/utils/Utils.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/utils/Utils.java 
b/storm-core/src/jvm/org/apache/storm/utils/Utils.java
index a0c0b1a..a04bb04 100644
--- a/storm-core/src/jvm/org/apache/storm/utils/Utils.java
+++ b/storm-core/src/jvm/org/apache/storm/utils/Utils.java
@@ -302,6 +302,14 @@ public class Utils {
         return ret.toString();
     }
 
+    public static long bitXorVals(List<Long> coll) {
+        long result = 0;
+        for (Long val : coll) {
+            result ^= val;
+        }
+        return result;
+    }
+
     public static void sleep(long millis) {
         try {
             Time.sleep(millis);

Reply via email to