partitionAssignment fails to calculate when there is FULL_AUTO resource that has ANY_LIVEINSTANCE for replica count.
To Reproduce
Create a resource that utilizes ANY_LIVEINSTANCE, then call partitionAssignment on the cluster and it will fail to compute. Stack trace will show it failed due to a java.lang.NumberFormatException. This is due to Integer.parseInt(idealState.getReplicas()) in the getIdealAssignmentForFullAuto method. idealState.getReplicas returns "ANY_LIVEINSTANCE" which then fails to be parsed to an int.
Describe the bug
partitionAssignment fails to calculate when there is FULL_AUTO resource that has
ANY_LIVEINSTANCE
for replica count.To Reproduce
Create a resource that utilizes ANY_LIVEINSTANCE, then call partitionAssignment on the cluster and it will fail to compute. Stack trace will show it failed due to a
java.lang.NumberFormatException
. This is due toInteger.parseInt(idealState.getReplicas())
in thegetIdealAssignmentForFullAuto
method. idealState.getReplicas returns "ANY_LIVEINSTANCE" which then fails to be parsed to an int.Full stack trace here:
Expected behavior
partitionAssignment should treat ANY_LIVEINSTANCE similar to the controller or should explicitly exclude these resources from calculation.