jiajunwang commented on a change in pull request #639: Refine the WAGED
rebalancer to minimize the partial rebalance workload.
URL: https://github.com/apache/helix/pull/639#discussion_r352907708
##########
File path:
helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/model/ClusterModelProvider.java
##########
@@ -207,10 +408,10 @@ public static ClusterModel
generateClusterModelFromCurrentState(
*/
private static Set<AssignableNode> parseAllNodes(ClusterConfig clusterConfig,
Map<String, InstanceConfig> instanceConfigMap, Set<String>
activeInstances) {
- return activeInstances.parallelStream().map(
- instanceName -> new AssignableNode(clusterConfig,
instanceConfigMap.get(instanceName),
- instanceName))
- .collect(Collectors.toSet());
+ return activeInstances.parallelStream()
+ .filter(instance -> instanceConfigMap.containsKey(instance)).map(
Review comment:
It fails in some tests. I think we have some live instances in the cluster
without any config. For those instances, we can just ignore it.
Adding a line to the java doc.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]