use of org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.StopServerRequest in project hbase by apache.
the class HBaseAdmin method stopRegionServer.
@Override
public synchronized void stopRegionServer(final String hostnamePort) throws IOException {
String hostname = Addressing.parseHostname(hostnamePort);
int port = Addressing.parsePort(hostnamePort);
final AdminService.BlockingInterface admin = this.connection.getAdmin(ServerName.valueOf(hostname, port, 0));
// TODO: There is no timeout on this controller. Set one!
HBaseRpcController controller = rpcControllerFactory.newController();
controller.setPriority(HConstants.HIGH_QOS);
StopServerRequest request = RequestConverter.buildStopServerRequest("Called by admin client " + this.connection.toString());
try {
admin.stopServer(controller, request);
} catch (Exception e) {
throw ProtobufUtil.handleRemoteException(e);
}
}
Aggregations