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