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_r359102166
##########
File path:
helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/WagedRebalancer.java
##########
@@ -326,32 +328,17 @@ public void close() {
return newIdealStates;
}
- // Coordinate baseline recalculation and partial rebalance according to the
cluster changes.
+ // Coordinate global rebalance and partial rebalance according to the
cluster changes.
protected Map<String, ResourceAssignment> computeBestPossibleAssignment(
Review comment:
It's debatable. But I still prefer the current way.
1. A method with 2 lines is not a concern to me as long as the logic itself
makes sense. For here, this method include the WAGED rebalancer's core logic.
It is a standalone and self containing logic.
Imaging if I unwrap the globalRebalance and partialRebalance method here, we
will have more lines in this method. But it does not do anything good.
2. As you suggested, then I will need to override 2 methods instead of one.
And the testing logic for verifying the WAGED core algorithm has to call these
2 methods separately in each test cases.
----------------------------------------------------------------
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]