use of org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.DecommissionRegionServersRequest in project hbase by apache.
the class MasterRpcServices method decommissionRegionServers.
@Override
public DecommissionRegionServersResponse decommissionRegionServers(RpcController controller, DecommissionRegionServersRequest request) throws ServiceException {
try {
server.checkInitialized();
List<ServerName> servers = request.getServerNameList().stream().map(pbServer -> ProtobufUtil.toServerName(pbServer)).collect(Collectors.toList());
boolean offload = request.getOffload();
if (server.cpHost != null) {
server.cpHost.preDecommissionRegionServers(servers, offload);
}
server.decommissionRegionServers(servers, offload);
if (server.cpHost != null) {
server.cpHost.postDecommissionRegionServers(servers, offload);
}
} catch (IOException io) {
throw new ServiceException(io);
}
return DecommissionRegionServersResponse.newBuilder().build();
}
Aggregations