use of org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.DrainRegionServersRequest in project hbase by apache.
the class HBaseAdmin method drainRegionServers.
@Override
public void drainRegionServers(List<ServerName> servers) throws IOException {
final List<HBaseProtos.ServerName> pbServers = new ArrayList<>(servers.size());
for (ServerName server : servers) {
// Parse to ServerName to do simple validation.
ServerName.parseServerName(server.toString());
pbServers.add(ProtobufUtil.toServerName(server));
}
executeCallable(new MasterCallable<Void>(getConnection(), getRpcControllerFactory()) {
@Override
public Void rpcCall() throws ServiceException {
DrainRegionServersRequest req = DrainRegionServersRequest.newBuilder().addAllServerName(pbServers).build();
master.drainRegionServers(getRpcController(), req);
return null;
}
});
}
Aggregations