use of org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.ListDecommissionedRegionServersResponse in project hbase by apache.
the class MasterRpcServices method listDecommissionedRegionServers.
@Override
public ListDecommissionedRegionServersResponse listDecommissionedRegionServers(RpcController controller, ListDecommissionedRegionServersRequest request) throws ServiceException {
ListDecommissionedRegionServersResponse.Builder response = ListDecommissionedRegionServersResponse.newBuilder();
try {
server.checkInitialized();
if (server.cpHost != null) {
server.cpHost.preListDecommissionedRegionServers();
}
List<ServerName> servers = server.listDecommissionedRegionServers();
response.addAllServerName((servers.stream().map(server -> ProtobufUtil.toServerName(server))).collect(Collectors.toList()));
if (server.cpHost != null) {
server.cpHost.postListDecommissionedRegionServers();
}
} catch (IOException io) {
throw new ServiceException(io);
}
return response.build();
}
Aggregations