Search in sources :

Example 1 with RenameRSGroupResponse

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();
}
Also used : ServiceException(org.apache.hbase.thirdparty.com.google.protobuf.ServiceException) RenameRSGroupResponse(org.apache.hadoop.hbase.shaded.protobuf.generated.RSGroupAdminProtos.RenameRSGroupResponse) ByteString(org.apache.hbase.thirdparty.com.google.protobuf.ByteString) IOException(java.io.IOException) DoNotRetryIOException(org.apache.hadoop.hbase.DoNotRetryIOException)

Aggregations

IOException (java.io.IOException)1 DoNotRetryIOException (org.apache.hadoop.hbase.DoNotRetryIOException)1 RenameRSGroupResponse (org.apache.hadoop.hbase.shaded.protobuf.generated.RSGroupAdminProtos.RenameRSGroupResponse)1 ByteString (org.apache.hbase.thirdparty.com.google.protobuf.ByteString)1 ServiceException (org.apache.hbase.thirdparty.com.google.protobuf.ServiceException)1