Class GetSplitsRequest
- java.lang.Object
-
- com.amazonaws.athena.connector.lambda.request.FederationRequest
-
- com.amazonaws.athena.connector.lambda.metadata.MetadataRequest
-
- com.amazonaws.athena.connector.lambda.metadata.GetSplitsRequest
-
- All Implemented Interfaces:
AutoCloseable
public class GetSplitsRequest extends MetadataRequest
Represents the input of aGetSplits
operation.
-
-
Constructor Summary
Constructors Constructor Description GetSplitsRequest(GetSplitsRequest clone, String continuationToken)
Constructs a new GetSplitsRequest object from an existing one with the ability to change the continuation token.GetSplitsRequest(FederatedIdentity identity, String queryId, String catalogName, TableName tableName, Block partitions, List<String> partitionCols, Constraints constraints, String continuationToken)
Constructs a new GetSplitsRequest object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Frees up resources associated with thepartitions
andconstraints
Blocks.boolean
equals(Object o)
Constraints
getConstraints()
Returns the constraints that can be applied to split generation.String
getContinuationToken()
Returns the continuation token for split generation.List<String>
getPartitionCols()
Returns the partition columns used for partitioning.Block
getPartitions()
Returns the partitions that splits should be generated for.org.apache.arrow.vector.types.pojo.Schema
getSchema()
Convenience method to get the partition schema from partitions Block.TableName
getTableName()
Returns the table name that splits should be generated for.boolean
hasContinuationToken()
Convenience method that returns whether a continuation token is provided in this request.int
hashCode()
String
toString()
-
Methods inherited from class com.amazonaws.athena.connector.lambda.metadata.MetadataRequest
getCatalogName, getContext, getQueryId, getRequestType, setContext
-
Methods inherited from class com.amazonaws.athena.connector.lambda.request.FederationRequest
getIdentity
-
-
-
-
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 thepartitions
andconstraints
Blocks.- Throws:
Exception
-
-