You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@storm.apache.org by "Jungtaek Lim (JIRA)" <ji...@apache.org> on 2017/01/19 09:09:26 UTC

[jira] [Created] (STORM-2305) STORM-2279 calculates task index different from grouper code

Jungtaek Lim created STORM-2305:
-----------------------------------

             Summary: STORM-2279 calculates task index different from grouper code
                 Key: STORM-2305
                 URL: https://issues.apache.org/jira/browse/STORM-2305
             Project: Apache Storm
          Issue Type: Bug
          Components: storm-core
    Affects Versions: 2.0.0, 1.1.0, 1.0.3
            Reporter: Jungtaek Lim
            Priority: Blocker


Arun reported this from https://github.com/apache/storm/pull/1866#discussion_r95326528

Quoting his comment:

{quote}
This should match the task selected by fields grouping https://github.com/apache/storm/blob/master/storm-core/src/jvm/org/apache/storm/daemon/GrouperFactory.java#L159.
The modulo technique will return a different value than Math.abs. Probably we should move it to some common utility function and use it in both places.

In 1.x branch the fields grouper doesn't seem to account for negative hashCode, so not sure why didn't it come up before. https://github.com/apache/storm/blob/1.x-branch/storm-core/src/clj/org/apache/storm/daemon/executor.clj#L52
{quote}

So we should fix Nimbus code to use Math.abs on master, 1.x, 1.0.x branches, and also fix executor.clj to use Math.abs on 1.x, 1.0.x branches.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)