You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by "Zhen Zhang (JIRA)" <ji...@apache.org> on 2015/01/21 21:23:35 UTC

[jira] [Created] (HELIX-563) Throw more meaningful exceptions when AutoRebalanceStrategy#computePartitionAssignment inputs are invalid

Zhen Zhang created HELIX-563:
--------------------------------

             Summary: Throw more meaningful exceptions when AutoRebalanceStrategy#computePartitionAssignment inputs are invalid
                 Key: HELIX-563
                 URL: https://issues.apache.org/jira/browse/HELIX-563
             Project: Apache Helix
          Issue Type: Bug
            Reporter: Zhen Zhang


We hit the following NPE when the input for AutoRebalanceStrategy#computePartitionAssignment is invalid:

{noformat}
java.lang.NullPointerException
        at org.apache.helix.controller.strategy.AutoRebalanceStrategy$Node.access$300(AutoRebalanceStrategy.java:571)
        at org.apache.helix.controller.strategy.AutoRebalanceStrategy.computeExistingNonPreferredPlacement(AutoRebalanceStrategy.java:437)
        at org.apache.helix.controller.strategy.AutoRebalanceStrategy.computePartitionAssignment(AutoRebalanceStrategy.java:122)
...
{noformat}

The particular problem is curMapping.keySet() is not a subset of allPartitions in the following code snippet:

{noformat}
AutoRebalanceStrategy strategy = new AutoRebalanceStrategy(.., allPartitions,...)
strategy.computePartitionAssignment(..., curMapping, ...)
{noformat}





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