use of org.apache.hadoop.hbase.protobuf.generated.RSGroupAdminProtos.MoveServersRequest in project hbase by apache.
the class RSGroupAdminClient method moveServers.
@Override
public void moveServers(Set<Address> servers, String targetGroup) throws IOException {
Set<HBaseProtos.ServerName> hostPorts = Sets.newHashSet();
for (Address el : servers) {
hostPorts.add(HBaseProtos.ServerName.newBuilder().setHostName(el.getHostname()).setPort(el.getPort()).build());
}
MoveServersRequest request = MoveServersRequest.newBuilder().setTargetGroup(targetGroup).addAllServers(hostPorts).build();
try {
stub.moveServers(null, request);
} catch (ServiceException e) {
throw ProtobufUtil.handleRemoteException(e);
}
}
Aggregations