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 2021/01/25 20:16:09 UTC

[GitHub] [helix] NealSun96 commented on a change in pull request #1619: Allow cutomizing default rebalance configuration for the supercluster resources.

NealSun96 commented on a change in pull request #1619:
URL: https://github.com/apache/helix/pull/1619#discussion_r564013199



##########
File path: helix-core/src/main/java/org/apache/helix/model/ClusterConfig.java
##########
@@ -1018,6 +1032,22 @@ public void setAbnormalStateResolverMap(Map<String, String> resolverMap) {
     return idealStateRuleMap;
   }
 
+  public void setSuperClusterRebalanceConfig(RebalanceConfig rebalanceConfig) {
+    _record.setMapField(ClusterConfigProperty.SUPER_CLUSTER_REBALANCE_CONFIG.name(),
+        rebalanceConfig.getConfigsMap());
+  }
+
+  public RebalanceConfig getSuperClusterRebalanceConfig() {
+    Map<String, String> rebalanceConfigMap =
+        _record.getMapField(ClusterConfigProperty.SUPER_CLUSTER_REBALANCE_CONFIG.name());
+    if (rebalanceConfigMap != null) {
+      return new RebalanceConfig(rebalanceConfigMap);
+    } else {

Review comment:
       Unnecessary else block

##########
File path: helix-core/src/main/java/org/apache/helix/model/ClusterConfig.java
##########
@@ -167,6 +173,14 @@
   private static final int GLOBAL_TARGET_TASK_THREAD_POOL_SIZE_NOT_SET = -1;
   private static final int OFFLINE_NODE_TIME_OUT_FOR_MAINTENANCE_MODE_NOT_SET = -1;
 
+  private static final Map<String, String> DEFAULT_SUPER_CLUSTER_REBALANCE_CONFIG = ImmutableMap
+      .of(RebalanceConfig.RebalanceConfigProperty.REBALANCE_MODE.name(),
+          RebalanceConfig.RebalanceMode.FULL_AUTO.name(),
+          RebalanceConfig.RebalanceConfigProperty.REBALANCER_CLASS_NAME.name(),
+          DelayedAutoRebalancer.class.getName(),

Review comment:
       I thought it's WAGED by default? 




----------------------------------------------------------------
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



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