Class MetricsRecordHandler
- java.lang.Object
-
- com.amazonaws.athena.connector.lambda.handlers.RecordHandler
-
- com.amazonaws.athena.connectors.cloudwatch.metrics.MetricsRecordHandler
-
- All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.RequestStreamHandler
public class MetricsRecordHandler extends RecordHandler
Handles data read record requests for the Athena Cloudwatch Metrics Connector.For more detail, please see the module's README.md, some notable characteristics of this class include:
1. Reads and maps Cloudwatch Metrics and Metric Samples. 2. Attempts to push down time range predicates into Cloudwatch Metrics.
-
-
Field Summary
-
Fields inherited from class com.amazonaws.athena.connector.lambda.handlers.RecordHandler
configOptions
-
-
Constructor Summary
Constructors Modifier Constructor Description MetricsRecordHandler(Map<String,String> configOptions)
protected
MetricsRecordHandler(software.amazon.awssdk.services.s3.S3Client amazonS3, software.amazon.awssdk.services.secretsmanager.SecretsManagerClient secretsManager, software.amazon.awssdk.services.athena.AthenaClient athena, software.amazon.awssdk.services.cloudwatch.CloudWatchClient metrics, Map<String,String> configOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
readWithConstraint(BlockSpiller blockSpiller, ReadRecordsRequest readRecordsRequest, QueryStatusChecker queryStatusChecker)
Scans Cloudwatch Metrics for the list of available metrics or the samples for a specific metric.-
Methods inherited from class com.amazonaws.athena.connector.lambda.handlers.RecordHandler
doHandleRequest, doReadRecords, getSecret, getSpillConfig, handleRequest, onPing, resolveSecrets
-
-
-
-
Constructor Detail
-
MetricsRecordHandler
protected MetricsRecordHandler(software.amazon.awssdk.services.s3.S3Client amazonS3, software.amazon.awssdk.services.secretsmanager.SecretsManagerClient secretsManager, software.amazon.awssdk.services.athena.AthenaClient athena, software.amazon.awssdk.services.cloudwatch.CloudWatchClient metrics, Map<String,String> configOptions)
-
-
Method Detail
-
readWithConstraint
protected void readWithConstraint(BlockSpiller blockSpiller, ReadRecordsRequest readRecordsRequest, QueryStatusChecker queryStatusChecker) throws TimeoutException
Scans Cloudwatch Metrics for the list of available metrics or the samples for a specific metric.- Specified by:
readWithConstraint
in classRecordHandler
- Parameters:
blockSpiller
- 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.readRecordsRequest
- Details of the read request, including: 1. The Split 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:
TimeoutException
- See Also:
RecordHandler
-
-