use of org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.RecommissionRegionServerResponse in project hbase by apache.
the class MasterRpcServices method recommissionRegionServer.
@Override
public RecommissionRegionServerResponse recommissionRegionServer(RpcController controller, RecommissionRegionServerRequest request) throws ServiceException {
try {
server.checkInitialized();
ServerName sn = ProtobufUtil.toServerName(request.getServerName());
List<byte[]> encodedRegionNames = request.getRegionList().stream().map(regionSpecifier -> regionSpecifier.getValue().toByteArray()).collect(Collectors.toList());
if (server.cpHost != null) {
server.cpHost.preRecommissionRegionServer(sn, encodedRegionNames);
}
server.recommissionRegionServer(sn, encodedRegionNames);
if (server.cpHost != null) {
server.cpHost.postRecommissionRegionServer(sn, encodedRegionNames);
}
} catch (IOException io) {
throw new ServiceException(io);
}
return RecommissionRegionServerResponse.newBuilder().build();
}
Aggregations