Github user HeartSaVioR commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1866#discussion_r97005261
  
    --- Diff: storm-core/src/jvm/org/apache/storm/daemon/nimbus/Nimbus.java ---
    @@ -3600,7 +3600,7 @@ public ComponentPageInfo getComponentPageInfo(String 
topoId, String componentId,
                     List<Integer> tasks = 
compToTasks.get(StormCommon.EVENTLOGGER_COMPONENT_ID);
                     tasks.sort(null);
                     // Find the task the events from this component route to.
    -                int taskIndex = 
TupleUtils.listHashCode(Arrays.asList(componentId)) %
    +                int taskIndex = 
(TupleUtils.listHashCode(Arrays.asList(componentId)) % tasks.size() + 
tasks.size()) %
    --- End diff --
    
    @arunmahadevan In 1.x branch the field grouper does care about negative 
hashCode, via using [mod](https://clojuredocs.org/clojure.core/mod) instead of 
[rem](https://clojuredocs.org/clojure.core/rem).
    
    http://stackoverflow.com/a/13060774/3480122
    
    So it turned out we missed this point while porting to Java.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to