You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by ji...@apache.org on 2021/04/23 21:18:27 UTC
[helix] 03/03: Increase largest possible rebalance preference ratio
(#1668)
This is an automated email from the ASF dual-hosted git repository.
jiajunwang pushed a commit to branch wagedImprove
in repository https://gitbox.apache.org/repos/asf/helix.git
commit c76d3a0d11960c8bcb20a68d7ad1cc35869a2420
Author: Neal Sun <ne...@gmail.com>
AuthorDate: Wed Mar 10 11:28:58 2021 -0800
Increase largest possible rebalance preference ratio (#1668)
This PR increases largest possible rebalance preference ratio by enlarging the maximum weight from 10 to 1000.
Co-authored-by: Neal Sun <ne...@nesun-mn1.linkedin.biz>
---
.../rebalancer/waged/constraints/ConstraintBasedAlgorithmFactory.java | 2 +-
helix-core/src/main/java/org/apache/helix/model/ClusterConfig.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/constraints/ConstraintBasedAlgorithmFactory.java b/helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/constraints/ConstraintBasedAlgorithmFactory.java
index 032c7b5..1274d83 100644
--- a/helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/constraints/ConstraintBasedAlgorithmFactory.java
+++ b/helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/constraints/ConstraintBasedAlgorithmFactory.java
@@ -49,7 +49,7 @@ public class ConstraintBasedAlgorithmFactory {
// The weight for BaselineInfluenceConstraint used when we are forcing a baseline converge. This
// number, multiplied by the max score returned by BaselineInfluenceConstraint, must be greater
// than the total maximum sum of all other constraints, in order to overpower other constraints.
- private static final float FORCE_BASELINE_CONVERGE_WEIGHT = 10000f;
+ private static final float FORCE_BASELINE_CONVERGE_WEIGHT = 100000f;
static {
Properties properties =
diff --git a/helix-core/src/main/java/org/apache/helix/model/ClusterConfig.java b/helix-core/src/main/java/org/apache/helix/model/ClusterConfig.java
index ccb1684..68c1d4d 100644
--- a/helix-core/src/main/java/org/apache/helix/model/ClusterConfig.java
+++ b/helix-core/src/main/java/org/apache/helix/model/ClusterConfig.java
@@ -164,7 +164,7 @@ public class ClusterConfig extends HelixProperty {
.put(GlobalRebalancePreferenceKey.EVENNESS, 1)
.put(GlobalRebalancePreferenceKey.LESS_MOVEMENT, 1)
.put(GlobalRebalancePreferenceKey.FORCE_BASELINE_CONVERGE, 0).build();
- private final static int MAX_REBALANCE_PREFERENCE = 10;
+ private final static int MAX_REBALANCE_PREFERENCE = 1000;
private final static int MIN_REBALANCE_PREFERENCE = 0;
public final static boolean DEFAULT_GLOBAL_REBALANCE_ASYNC_MODE_ENABLED = true;
private static final int GLOBAL_TARGET_TASK_THREAD_POOL_SIZE_NOT_SET = -1;