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 aGetSplitsoperation.
-
-
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 voidclose()Frees up resources associated with thepartitionsandconstraintsBlocks.booleanequals(Object o)ConstraintsgetConstraints()Returns the constraints that can be applied to split generation.StringgetContinuationToken()Returns the continuation token for split generation.List<String>getPartitionCols()Returns the partition columns used for partitioning.BlockgetPartitions()Returns the partitions that splits should be generated for.org.apache.arrow.vector.types.pojo.SchemagetSchema()Convenience method to get the partition schema from partitions Block.TableNamegetTableName()Returns the table name that splits should be generated for.booleanhasContinuationToken()Convenience method that returns whether a continuation token is provided in this request.inthashCode()StringtoString()-
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 ExceptionFrees up resources associated with thepartitionsandconstraintsBlocks.- Throws:
Exception
-
-