You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by jx...@apache.org on 2018/01/25 21:49:04 UTC
[13/50] [abbrv] helix git commit: Switch pause cluster to maintenance
mode when hit maximal offline instance limit
Switch pause cluster to maintenance mode when hit maximal offline instance limit
Project: http://git-wip-us.apache.org/repos/asf/helix/repo
Commit: http://git-wip-us.apache.org/repos/asf/helix/commit/d1cbfdba
Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/d1cbfdba
Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/d1cbfdba
Branch: refs/heads/master
Commit: d1cbfdba3e932d8ecebd9fdba86b6174de690973
Parents: a7477c3
Author: Junkai Xue <jx...@linkedin.com>
Authored: Wed Nov 8 11:24:54 2017 -0800
Committer: Junkai Xue <jx...@linkedin.com>
Committed: Wed Jan 24 18:31:17 2018 -0800
----------------------------------------------------------------------
.../helix/controller/stages/BestPossibleStateCalcStage.java | 3 ++-
.../helix/controller/stages/IntermediateStateCalcStage.java | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/helix/blob/d1cbfdba/helix-core/src/main/java/org/apache/helix/controller/stages/BestPossibleStateCalcStage.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/controller/stages/BestPossibleStateCalcStage.java b/helix-core/src/main/java/org/apache/helix/controller/stages/BestPossibleStateCalcStage.java
index 4fb8cd7..e96f0f3 100644
--- a/helix-core/src/main/java/org/apache/helix/controller/stages/BestPossibleStateCalcStage.java
+++ b/helix-core/src/main/java/org/apache/helix/controller/stages/BestPossibleStateCalcStage.java
@@ -180,7 +180,8 @@ public class BestPossibleStateCalcStage extends AbstractBaseStage {
"Offline Instances count %d greater than allowed count %d. Stop rebalance pipeline and pause the cluster %s",
offlineCount, maxOfflineInstancesAllowed, cache.getClusterName());
if (manager != null) {
- manager.getClusterManagmentTool().enableCluster(manager.getClusterName(), false, errMsg);
+ manager.getClusterManagmentTool()
+ .enableMaintenanceMode(manager.getClusterName(), true, errMsg);
} else {
logger.error("Failed to pause cluster, HelixManager is not set!");
}
http://git-wip-us.apache.org/repos/asf/helix/blob/d1cbfdba/helix-core/src/main/java/org/apache/helix/controller/stages/IntermediateStateCalcStage.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/controller/stages/IntermediateStateCalcStage.java b/helix-core/src/main/java/org/apache/helix/controller/stages/IntermediateStateCalcStage.java
index 27eab81..2bd0229 100644
--- a/helix-core/src/main/java/org/apache/helix/controller/stages/IntermediateStateCalcStage.java
+++ b/helix-core/src/main/java/org/apache/helix/controller/stages/IntermediateStateCalcStage.java
@@ -179,7 +179,7 @@ public class IntermediateStateCalcStage extends AbstractBaseStage {
instance, maxPartitionPerInstance, cache.getClusterName());
if (manager != null) {
manager.getClusterManagmentTool()
- .enableCluster(manager.getClusterName(), false, errMsg);
+ .enableMaintenanceMode(manager.getClusterName(), true, errMsg);
} else {
logger.error("Failed to pause cluster, HelixManager is not set!");
}