Ethan Li created STORM-2950:

             Summary: ArrayIndexOutOfBoundsException in 
TupleUtils.chooseTaskIndex function
                 Key: STORM-2950
             Project: Apache Storm
          Issue Type: Bug
            Reporter: Ethan Li
            Assignee: Ethan Li

public static <T> int chooseTaskIndex(List<T> keys, int numTasks) {
    return Math.abs(listHashCode(keys)) % numTasks;
listHashCode(keys) might return Integer.MIN_VALUE (-2147483648).   
Math.abs(-2147483648) equals to  -2147483648. 

In this case, chooseTaskIndex might return negative numbers and it will cause 

This message was sent by Atlassian JIRA

Reply via email to