Repository: storm Updated Branches: refs/heads/1.x-branch 5fd312153 -> 6861ad332
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/73141062 Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/73141062 Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/73141062 Branch: refs/heads/1.x-branch Commit: 731410622cabdf6a5413e637f44cd7c0c6c657fa Parents: 5fd3121 Author: Roshan Naik <[email protected]> Authored: Thu Feb 11 15:40:39 2016 -0800 Committer: Roshan Naik <[email protected]> Committed: Fri Feb 12 13:15:28 2016 -0800 ---------------------------------------------------------------------- storm-core/src/clj/org/apache/storm/daemon/executor.clj | 2 +- storm-core/src/jvm/org/apache/storm/utils/Utils.java | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/storm/blob/73141062/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 251387b..be18c3b 100644 --- a/storm-core/src/clj/org/apache/storm/daemon/executor.clj +++ b/storm-core/src/clj/org/apache/storm/daemon/executor.clj @@ -581,7 +581,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/73141062/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 9d0c7c6..cbf34a2 100644 --- a/storm-core/src/jvm/org/apache/storm/utils/Utils.java +++ b/storm-core/src/jvm/org/apache/storm/utils/Utils.java @@ -250,6 +250,15 @@ 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);
