Search in sources :

Example 1 with AddRSGroupResponse

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

the class MasterRpcServices method addRSGroup.

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

Aggregations

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