Search in sources :

Example 1 with ListDrainingRegionServersResponse

use of org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.ListDrainingRegionServersResponse in project hbase by apache.

the class MasterRpcServices method listDrainingRegionServers.

@Override
public ListDrainingRegionServersResponse listDrainingRegionServers(RpcController controller, ListDrainingRegionServersRequest request) throws ServiceException {
    ListDrainingRegionServersResponse.Builder response = ListDrainingRegionServersResponse.newBuilder();
    try {
        master.checkInitialized();
        List<ServerName> servers = master.listDrainingRegionServers();
        for (ServerName server : servers) {
            response.addServerName(ProtobufUtil.toServerName(server));
        }
    } catch (IOException io) {
        throw new ServiceException(io);
    }
    return response.build();
}
Also used : ServiceException(org.apache.hadoop.hbase.shaded.com.google.protobuf.ServiceException) ServerName(org.apache.hadoop.hbase.ServerName) ListDrainingRegionServersResponse(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.ListDrainingRegionServersResponse) IOException(java.io.IOException) DoNotRetryIOException(org.apache.hadoop.hbase.DoNotRetryIOException)

Aggregations

IOException (java.io.IOException)1 DoNotRetryIOException (org.apache.hadoop.hbase.DoNotRetryIOException)1 ServerName (org.apache.hadoop.hbase.ServerName)1 ServiceException (org.apache.hadoop.hbase.shaded.com.google.protobuf.ServiceException)1 ListDrainingRegionServersResponse (org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.ListDrainingRegionServersResponse)1