Search in sources :

Example 1 with RemoveRSGroupResponse

use of org.apache.hadoop.hbase.shaded.protobuf.generated.RSGroupAdminProtos.RemoveRSGroupResponse in project hbase by apache.

the class MasterRpcServices method removeRSGroup.

@Override
public RemoveRSGroupResponse removeRSGroup(RpcController controller, RemoveRSGroupRequest request) throws ServiceException {
    RemoveRSGroupResponse.Builder builder = RemoveRSGroupResponse.newBuilder();
    LOG.info(server.getClientIdAuditPrefix() + " remove rsgroup " + request.getRSGroupName());
    try {
        if (server.getMasterCoprocessorHost() != null) {
            server.getMasterCoprocessorHost().preRemoveRSGroup(request.getRSGroupName());
        }
        server.getRSGroupInfoManager().removeRSGroup(request.getRSGroupName());
        if (server.getMasterCoprocessorHost() != null) {
            server.getMasterCoprocessorHost().postRemoveRSGroup(request.getRSGroupName());
        }
    } catch (IOException e) {
        throw new ServiceException(e);
    }
    return builder.build();
}
Also used : ServiceException(org.apache.hbase.thirdparty.com.google.protobuf.ServiceException) RemoveRSGroupResponse(org.apache.hadoop.hbase.shaded.protobuf.generated.RSGroupAdminProtos.RemoveRSGroupResponse) IOException(java.io.IOException) DoNotRetryIOException(org.apache.hadoop.hbase.DoNotRetryIOException)

Aggregations

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