You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2019/08/27 00:24:36 UTC

[GitHub] [helix] jiajunwang commented on a change in pull request #369: The fix for assigning partitions when instance weight = 0

jiajunwang commented on a change in pull request #369: The fix for assigning partitions when instance weight = 0
URL: https://github.com/apache/helix/pull/369#discussion_r317849467
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/controller/rebalancer/strategy/AbstractEvenDistributionRebalanceStrategy.java
 ##########
 @@ -82,7 +83,17 @@ public void init(String resourceName, final List<String> partitions,
   @Override
   public ZNRecord computePartitionAssignment(final List<String> allNodes,
       final List<String> liveNodes, final Map<String, Map<String, String>> currentMapping,
-      ResourceControllerDataProvider clusterData) throws HelixException {
+      ResourceControllerDataProvider clusterData) {
+    Topology allNodeTopology = new Topology(allNodes, allNodes, clusterData.getInstanceConfigMap(),
 
 Review comment:
   Why you need a temporary topology for this calculation? The topology calculation is relatively slow you know.
   I prefer you just add a method here, or in some util to filter out 0 weight nodes.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org