[ 
https://issues.apache.org/jira/browse/HELIX-563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhen Zhang closed HELIX-563.
----------------------------
    Resolution: Fixed

https://git-wip-us.apache.org/repos/asf?p=helix.git;a=commit;h=03d25dd5bdbd30df5d5c7b9807ccacc1462266fd

> 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
>            Assignee: 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)

Reply via email to