jiajunwang commented on a change in pull request #1740:
URL: https://github.com/apache/helix/pull/1740#discussion_r635610464
##########
File path:
helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixAdmin.java
##########
@@ -497,6 +500,72 @@ public boolean isInMaintenanceMode(String clusterName) {
.exists(keyBuilder.maintenance().getPath(), AccessOption.PERSISTENT);
}
+ @Override
+ public void setClusterManagementMode(ClusterManagementModeRequest request) {
+ ClusterManagementMode.Type mode = request.getMode();
+ String clusterName = request.getClusterName();
+ String reason = request.getReason();
+
+ // TODO: support other modes
+ switch (mode) {
+ case CLUSTER_PAUSE:
+ enableClusterPauseMode(clusterName, request.isCancelPendingST(),
reason);
+ break;
+ case NORMAL:
+ // If from other modes, should check what mode it is in and call the
api accordingly.
+ // If we put all mode config in one znode, one generic method is good
enough.
+ disableClusterPauseMode(clusterName);
+ break;
+ default:
+ throw new IllegalArgumentException("ClusterManagementMode " + mode + "
not supported");
Review comment:
???
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]