Source:
<code>public Map<String, IdealState> computeNewIdealStates(ResourceControllerDataProvider clusterData, Map<String, Resource> resourceMap, final CurrentStateOutput currentStateOutput) throws HelixRebalanceException { if (resourceMap.isEmpty()) { LOG.warn("There is no resource to be rebalanced by {}", this.getClass().getSimpleName()); return Collections.emptyMap(); } LOG.info("Start computing new ideal states for resources: {}", resourceMap.keySet().toString()); if (!resourceMap.entrySet().stream().allMatch(resourceEntry -> { IdealState is = clusterData.getIdealState(resourceEntry.getKey()); return is != null && is.getRebalanceMode().equals(IdealState.RebalanceMode.FULL_AUTO) && getClass().getName().equals(is.getRebalancerClassName()); })) { throw new HelixRebalanceException( <START> "Input contains invalid resource(s) that cannot be rebalanced by the WAGED rebalancer.", <END> HelixRebalanceException.Type.INVALID_INPUT); } Map<String, IdealState> newIdealStates = computeBestPossibleStates(clusterData, resourceMap, currentStateOutput); for (IdealState is : newIdealStates.values()) { String resourceName = is.getResourceName(); ResourceAssignment finalAssignment = _mappingCalculator.computeBestPossiblePartitionState( clusterData, is, resourceMap.get(resourceName), currentStateOutput); is.getRecord().getMapFields().clear(); for (Partition partition : finalAssignment.getMappedPartitions()) { Map<String, String> newStateMap = finalAssignment.getReplicaMap(partition); is.setInstanceStateMap(partition.getPartitionName(), newStateMap == null ? Collections.emptyMap() : newStateMap); } } LOG.info("Finish computing new ideal states for resources: {}", resourceMap.keySet().toString()); return newIdealStates; }</code><technical_language>I occurrence for this Exception low, a idea log names of resources rebalanced? operator's perspective, very, helpful. If I this exception actual names of resources, this error message is useless. 100 resources, rebalance failed due 1 of - loop 100 of find problem child</technical_language>

Target:
public Map<String, IdealState> computeNewIdealStates(ResourceControllerDataProvider clusterData, Map<String, Resource> resourceMap, final CurrentStateOutput currentStateOutput) throws HelixRebalanceException { if (resourceMap.isEmpty()) { LOG.warn("There is no resource to be rebalanced by {}", this.getClass().getSimpleName()); return Collections.emptyMap(); } LOG.info("Start computing new ideal states for resources: {}", resourceMap.keySet().toString()); validateInput(clusterData, resourceMap); Map<String, IdealState> newIdealStates = computeBestPossibleStates(clusterData, resourceMap, currentStateOutput); for (IdealState is : newIdealStates.values()) { String resourceName = is.getResourceName(); ResourceAssignment finalAssignment = _mappingCalculator.computeBestPossiblePartitionState( clusterData, is, resourceMap.get(resourceName), currentStateOutput); is.getRecord().getMapFields().clear(); for (Partition partition : finalAssignment.getMappedPartitions()) { Map<String, String> newStateMap = finalAssignment.getReplicaMap(partition); is.setInstanceStateMap(partition.getPartitionName(), newStateMap == null ? Collections.emptyMap() : newStateMap); } } LOG.info("Finish computing new ideal states for resources: {}", resourceMap.keySet().toString()); return newIdealStates; }