Class GetSplitsRequest

  • All Implemented Interfaces:
    AutoCloseable

    public class GetSplitsRequest
    extends MetadataRequest
    Represents the input of a GetSplits operation.
    • Constructor Detail

      • GetSplitsRequest

        public GetSplitsRequest​(FederatedIdentity identity,
                                String queryId,
                                String catalogName,
                                TableName tableName,
                                Block partitions,
                                List<String> partitionCols,
                                Constraints constraints,
                                String continuationToken)
        Constructs a new GetSplitsRequest object.
        Parameters:
        identity - The identity of the caller.
        queryId - The ID of the query requesting metadata.
        catalogName - The catalog name that splits should be generated for.
        tableName - The table name that splits should be generated for.
        partitions - The partitions that splits should be generated for.
        partitionCols - The partition columns used for partitioning.
        constraints - The constraints that can be applied to split generation.
        continuationToken - The continuation token from which split generation should be resumed.
      • GetSplitsRequest

        public GetSplitsRequest​(GetSplitsRequest clone,
                                String continuationToken)
        Constructs a new GetSplitsRequest object from an existing one with the ability to change the continuation token. Helpful when making a continuation call since it requires the original request but updated token.
        Parameters:
        clone - The original request.
        continuationToken - The continuation token for the next paginated request.
    • Method Detail

      • getContinuationToken

        public String getContinuationToken()
        Returns the continuation token for split generation. If present, this is a paginated request and split generation should be resumed using the provided token.
        Returns:
        The continuation token for the next paginated request.
      • getTableName

        public TableName getTableName()
        Returns the table name that splits should be generated for.
        Returns:
        The table name that splits should be generated for.
      • getSchema

        public org.apache.arrow.vector.types.pojo.Schema getSchema()
        Convenience method to get the partition schema from partitions Block.
        Returns:
        The schema of the partitions.
      • getPartitionCols

        public List<String> getPartitionCols()
        Returns the partition columns used for partitioning.
        Returns:
        The partition columns used for partitioning.
      • getPartitions

        public Block getPartitions()
        Returns the partitions that splits should be generated for.
        Returns:
        The partitions that splits should be generated for.
      • getConstraints

        public Constraints getConstraints()
        Returns the constraints that can be applied to split generation.
        Returns:
        The constraints that can be applied to split generation.
      • hasContinuationToken

        public boolean hasContinuationToken()
        Convenience method that returns whether a continuation token is provided in this request. If true, this is a paginated request and split generation should be resumed using the provided token.
        Returns:
        The continuation token from which split generation should be resumed.
      • close

        public void close()
                   throws Exception
        Frees up resources associated with the partitions and constraints Blocks.
        Throws:
        Exception
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object