Github user HeartSaVioR commented on a diff in the pull request:
https://github.com/apache/storm/pull/2558#discussion_r168331437
--- Diff: storm-client/src/jvm/org/apache/storm/utils/TupleUtils.java ---
@@ -41,7 +41,7 @@ public static boolean isTick(Tuple tuple) {
}
public static <T> int chooseTaskIndex(List<T> keys, int numTasks) {
- return Math.abs(listHashCode(keys)) % numTasks;
+ return Math.abs(listHashCode(keys) % numTasks);
--- End diff --
Worth noting that `Math.abs(listHashCode(keys)) % numTasks` != `(mod
listHashCode(keys) numTasks)` so we did it wrong, and fortunately found it.
---