use of org.apache.hadoop.hbase.shaded.protobuf.generated.RSGroupAdminProtos.RemoveServersResponse in project hbase by apache.
the class MasterRpcServices method removeServers.
@Override
public RemoveServersResponse removeServers(RpcController controller, RemoveServersRequest request) throws ServiceException {
RemoveServersResponse.Builder builder = RemoveServersResponse.newBuilder();
Set<Address> servers = Sets.newHashSet();
for (HBaseProtos.ServerName el : request.getServersList()) {
servers.add(Address.fromParts(el.getHostName(), el.getPort()));
}
LOG.info(server.getClientIdAuditPrefix() + " remove decommissioned servers from rsgroup: " + servers);
try {
if (server.getMasterCoprocessorHost() != null) {
server.getMasterCoprocessorHost().preRemoveServers(servers);
}
server.getRSGroupInfoManager().removeServers(servers);
if (server.getMasterCoprocessorHost() != null) {
server.getMasterCoprocessorHost().postRemoveServers(servers);
}
} catch (IOException e) {
throw new ServiceException(e);
}
return builder.build();
}
Aggregations