You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve the algorithm so it prioritizes the assignment to the idle nodes when the constraint evaluation results are the same (#651)
This is to get rid of the randomness when the algorithm result is a tie. Usually, when the algorithm picks up the nodes with the same score, more partition movements will be triggered on a cluster change.
Copy file name to clipboardExpand all lines: helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/constraints/ConstraintBasedAlgorithm.java
+33-8Lines changed: 33 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@
20
20
*/
21
21
22
22
importjava.util.ArrayList;
23
-
importjava.util.Comparator;
23
+
importjava.util.Collection;
24
24
importjava.util.HashMap;
25
25
importjava.util.List;
26
26
importjava.util.Map;
@@ -63,18 +63,22 @@ class ConstraintBasedAlgorithm implements RebalanceAlgorithm {
0 commit comments