Search in sources :

Example 1 with RemoveDrainFromRegionServersRequest

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

the class HBaseAdmin method removeDrainFromRegionServers.

@Override
public void removeDrainFromRegionServers(List<ServerName> servers) throws IOException {
    final List<HBaseProtos.ServerName> pbServers = new ArrayList<>(servers.size());
    for (ServerName server : servers) {
        pbServers.add(ProtobufUtil.toServerName(server));
    }
    executeCallable(new MasterCallable<Void>(getConnection(), getRpcControllerFactory()) {

        @Override
        public Void rpcCall() throws ServiceException {
            RemoveDrainFromRegionServersRequest req = RemoveDrainFromRegionServersRequest.newBuilder().addAllServerName(pbServers).build();
            master.removeDrainFromRegionServers(getRpcController(), req);
            return null;
        }
    });
}
Also used : ServiceException(org.apache.hadoop.hbase.shaded.com.google.protobuf.ServiceException) RemoveDrainFromRegionServersRequest(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.RemoveDrainFromRegionServersRequest) ServerName(org.apache.hadoop.hbase.ServerName) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 ServerName (org.apache.hadoop.hbase.ServerName)1 ServiceException (org.apache.hadoop.hbase.shaded.com.google.protobuf.ServiceException)1 RemoveDrainFromRegionServersRequest (org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.RemoveDrainFromRegionServersRequest)1