use of org.apache.hadoop.hbase.shaded.protobuf.generated.RSGroupAdminProtos.RenameRSGroupResponse in project hbase by apache.
the class MasterRpcServices method renameRSGroup.
@Override
public RenameRSGroupResponse renameRSGroup(RpcController controller, RenameRSGroupRequest request) throws ServiceException {
RenameRSGroupResponse.Builder builder = RenameRSGroupResponse.newBuilder();
String oldRSGroup = request.getOldRsgroupName();
String newRSGroup = request.getNewRsgroupName();
LOG.info("{} rename rsgroup from {} to {} ", server.getClientIdAuditPrefix(), oldRSGroup, newRSGroup);
try {
if (server.getMasterCoprocessorHost() != null) {
server.getMasterCoprocessorHost().preRenameRSGroup(oldRSGroup, newRSGroup);
}
server.getRSGroupInfoManager().renameRSGroup(oldRSGroup, newRSGroup);
if (server.getMasterCoprocessorHost() != null) {
server.getMasterCoprocessorHost().postRenameRSGroup(oldRSGroup, newRSGroup);
}
} catch (IOException e) {
throw new ServiceException(e);
}
return builder.build();
}
Aggregations