Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
When a dataset rebalance is done over a node group with no nodes, the following exception is encountered:
java.lang.ArithmeticException: / by zero at org.apache.asterix.metadata.declared.MetadataProvider.getCardinalityPerPartitionHint(MetadataProvider.java:719) ~[asterix-metadata-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT] at org.apache.asterix.metadata.utils.SecondaryIndexOperationsHelper.init(SecondaryIndexOperationsHelper.java:198) ~[asterix-metadata-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT] at org.apache.asterix.metadata.utils.SecondaryIndexOperationsHelper.createIndexOperationsHelper(SecondaryIndexOperationsHelper.java:163) ~[asterix-metadata-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT] at org.apache.asterix.metadata.utils.IndexUtil.buildDropIndexJobSpec(IndexUtil.java:112) ~[asterix-metadata-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT] at org.apache.asterix.utils.RebalanceUtil.dropDatasetFiles(RebalanceUtil.java:330) ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT] at org.apache.asterix.utils.RebalanceUtil.rebalance(RebalanceUtil.java:200) ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT] at org.apache.asterix.utils.RebalanceUtil.rebalance(RebalanceUtil.java:124) ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT]
The proposed solution is to treat rebalance to no nodes as a drop dataset.