diff --git a/hbase-protocol-shaded/src/main/protobuf/Master.proto b/hbase-protocol-shaded/src/main/protobuf/Master.proto index 369fcfbec6..8354ffd0a3 100644 --- a/hbase-protocol-shaded/src/main/protobuf/Master.proto +++ b/hbase-protocol-shaded/src/main/protobuf/Master.proto @@ -616,6 +616,8 @@ message ListDecommissionedRegionServersResponse { message DecommissionRegionServersRequest { repeated ServerName server_name = 1; required bool offload = 2; + optional bool kill_after_offload = 3 [default = false]; + optional bool replace_decommission_list = 4 [default = false]; } message DecommissionRegionServersResponse { diff --git a/hbase-protocol-shaded/src/main/protobuf/ZooKeeper.proto b/hbase-protocol-shaded/src/main/protobuf/ZooKeeper.proto index 383388b294..2b2e43cd3d 100644 --- a/hbase-protocol-shaded/src/main/protobuf/ZooKeeper.proto +++ b/hbase-protocol-shaded/src/main/protobuf/ZooKeeper.proto @@ -107,3 +107,11 @@ message DeprecatedTableState { message SwitchState { optional bool enabled = 1; } + +/** + * State of the decom request for a server. + */ +message DecommissionState { + optional bool offload = 1; + optional bool killAfterOffload = 2; +} \ No newline at end of file diff --git a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java index 20eb32700b..d0a3752408 100644 --- a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java +++ b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java @@ -635,7 +635,7 @@ public class RSGroupAdminServer implements RSGroupAdmin { private void checkForDeadOrOnlineServers(Set
servers) throws ConstraintException { // This uglyness is because we only have Address, not ServerName. Set onlineServers = new HashSet<>(); - ListThis class is responsible for watching for changes to the draining - * servers list. It handles adds/deletes in the draining RS list and - * watches each node. - * - *
If an RS gets deleted from draining list, we call - * {@link ServerManager#removeServerFromDrainList(ServerName)} - * - *
If an RS gets added to the draining list, we add a watcher to it and call - * {@link ServerManager#addServerToDrainList(ServerName)} - * - *
This class is deprecated in 2.0 because decommission/draining API goes through
- * master in 2.0. Can remove this class in 3.0.
- *
- */
-@InterfaceAudience.Private
-public class DrainingServerTracker extends ZKListener {
- private static final Logger LOG = LoggerFactory.getLogger(DrainingServerTracker.class);
-
- private ServerManager serverManager;
- private final NavigableSet All Draining RSs will be tracked after this method is called.
- *
- * @throws KeeperException
- */
- public void start() throws KeeperException, IOException {
- watcher.registerListener(this);
- // Add a ServerListener to check if a server is draining when it's added.
- serverManager.registerListener(new ServerListener() {
- @Override
- public void serverAdded(ServerName sn) {
- if (drainingServers.contains(sn)){
- serverManager.addServerToDrainList(sn);
- }
- }
- });
- List