Class GcsRecordHandler
- java.lang.Object
-
- com.amazonaws.athena.connector.lambda.handlers.RecordHandler
-
- com.amazonaws.athena.connectors.gcs.GcsRecordHandler
-
- All Implemented Interfaces:
FederationRequestHandler,com.amazonaws.services.lambda.runtime.RequestStreamHandler
public class GcsRecordHandler extends RecordHandler
-
-
Field Summary
Fields Modifier and Type Field Description static intBATCH_SIZE-
Fields inherited from class com.amazonaws.athena.connector.lambda.handlers.RecordHandler
configOptions
-
-
Constructor Summary
Constructors Modifier Constructor Description GcsRecordHandler(org.apache.arrow.memory.BufferAllocator allocator, Map<String,String> configOptions)protectedGcsRecordHandler(software.amazon.awssdk.services.s3.S3Client amazonS3, software.amazon.awssdk.services.secretsmanager.SecretsManagerClient secretsManager, software.amazon.awssdk.services.athena.AthenaClient amazonAthena, Map<String,String> configOptions)Constructor that provides access to S3, secret manager and athena
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidreadWithConstraint(BlockSpiller spiller, ReadRecordsRequest recordsRequest, QueryStatusChecker queryStatusChecker)Used to read the row data associated with the provided Split.-
Methods inherited from class com.amazonaws.athena.connector.lambda.handlers.RecordHandler
doHandleRequest, doReadRecords, getCachableSecretsManager, getRequestOverrideConfig, getSecret, getSpillConfig, handleRequest, onPing, resolveSecrets, resolveWithDefaultCredentials
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.amazonaws.athena.connector.lambda.handlers.FederationRequestHandler
getAthenaClient, getRequestOverrideConfig, getS3Client, getSessionCredentials
-
-
-
-
Field Detail
-
BATCH_SIZE
public static final int BATCH_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GcsRecordHandler
public GcsRecordHandler(org.apache.arrow.memory.BufferAllocator allocator, Map<String,String> configOptions)
-
GcsRecordHandler
protected GcsRecordHandler(software.amazon.awssdk.services.s3.S3Client amazonS3, software.amazon.awssdk.services.secretsmanager.SecretsManagerClient secretsManager, software.amazon.awssdk.services.athena.AthenaClient amazonAthena, Map<String,String> configOptions)Constructor that provides access to S3, secret manager and athena- Parameters:
amazonS3- An instance of AmazonS3secretsManager- An instance of AWSSecretsManageramazonAthena- An instance of AmazonAthena
-
-
Method Detail
-
readWithConstraint
protected void readWithConstraint(BlockSpiller spiller, ReadRecordsRequest recordsRequest, QueryStatusChecker queryStatusChecker) throws Exception
Used to read the row data associated with the provided Split.- Specified by:
readWithConstraintin classRecordHandler- Parameters:
spiller- A BlockSpiller that should be used to write the row data associated with this Split. The BlockSpiller automatically handles chunking the response, encrypting, and spilling to S3.recordsRequest- Details of the read request, including: 1. The Split - it contains information 2. The Catalog, Database, and Table the read request is for. 3. The filtering predicate (if any) 4. The columns required for projection.queryStatusChecker- A QueryStatusChecker that you can use to stop doing work for a query that has already terminated- Throws:
Exception
-
-