Search in sources :

Example 1 with ListTablesInRSGroupResponse

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

the class MasterRpcServices method listTablesInRSGroup.

@Override
public ListTablesInRSGroupResponse listTablesInRSGroup(RpcController controller, ListTablesInRSGroupRequest request) throws ServiceException {
    ListTablesInRSGroupResponse.Builder builder = ListTablesInRSGroupResponse.newBuilder();
    String groupName = request.getGroupName();
    LOG.info(server.getClientIdAuditPrefix() + " list tables in rsgroup " + groupName);
    try {
        if (server.getMasterCoprocessorHost() != null) {
            server.getMasterCoprocessorHost().preListTablesInRSGroup(groupName);
        }
        RSGroupUtil.listTablesInRSGroup(server, groupName).stream().map(ProtobufUtil::toProtoTableName).forEach(builder::addTableName);
        if (server.getMasterCoprocessorHost() != null) {
            server.getMasterCoprocessorHost().postListTablesInRSGroup(groupName);
        }
    } catch (IOException e) {
        throw new ServiceException(e);
    }
    return builder.build();
}
Also used : ServiceException(org.apache.hbase.thirdparty.com.google.protobuf.ServiceException) ListTablesInRSGroupResponse(org.apache.hadoop.hbase.shaded.protobuf.generated.RSGroupAdminProtos.ListTablesInRSGroupResponse) 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 ListTablesInRSGroupResponse (org.apache.hadoop.hbase.shaded.protobuf.generated.RSGroupAdminProtos.ListTablesInRSGroupResponse)1 ByteString (org.apache.hbase.thirdparty.com.google.protobuf.ByteString)1 ServiceException (org.apache.hbase.thirdparty.com.google.protobuf.ServiceException)1