Search in sources :

Example 1 with GetRSGroupInfoResponse

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

the class MasterRpcServices method getRSGroupInfo.

@Override
public GetRSGroupInfoResponse getRSGroupInfo(RpcController controller, GetRSGroupInfoRequest request) throws ServiceException {
    String groupName = request.getRSGroupName();
    LOG.info(server.getClientIdAuditPrefix() + " initiates rsgroup info retrieval, group=" + groupName);
    try {
        if (server.getMasterCoprocessorHost() != null) {
            server.getMasterCoprocessorHost().preGetRSGroupInfo(groupName);
        }
        RSGroupInfo rsGroupInfo = server.getRSGroupInfoManager().getRSGroup(groupName);
        GetRSGroupInfoResponse resp;
        if (rsGroupInfo != null) {
            resp = GetRSGroupInfoResponse.newBuilder().setRSGroupInfo(ProtobufUtil.toProtoGroupInfo(rsGroupInfo)).build();
        } else {
            resp = GetRSGroupInfoResponse.getDefaultInstance();
        }
        if (server.getMasterCoprocessorHost() != null) {
            server.getMasterCoprocessorHost().postGetRSGroupInfo(groupName);
        }
        return resp;
    } catch (IOException e) {
        throw new ServiceException(e);
    }
}
Also used : GetRSGroupInfoResponse(org.apache.hadoop.hbase.shaded.protobuf.generated.RSGroupAdminProtos.GetRSGroupInfoResponse) ServiceException(org.apache.hbase.thirdparty.com.google.protobuf.ServiceException) RSGroupInfo(org.apache.hadoop.hbase.rsgroup.RSGroupInfo) 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 RSGroupInfo (org.apache.hadoop.hbase.rsgroup.RSGroupInfo)1 GetRSGroupInfoResponse (org.apache.hadoop.hbase.shaded.protobuf.generated.RSGroupAdminProtos.GetRSGroupInfoResponse)1 ByteString (org.apache.hbase.thirdparty.com.google.protobuf.ByteString)1 ServiceException (org.apache.hbase.thirdparty.com.google.protobuf.ServiceException)1