Class AwsCmdbRecordHandler

  • All Implemented Interfaces:
    com.amazonaws.services.lambda.runtime.RequestStreamHandler

    public class AwsCmdbRecordHandler
    extends RecordHandler
    Handles record requests for the Athena AWS CMDB Connector.

    For more detail, please see the module's README.md, some notable characteristics of this class include:

    1. Maps AWS Resources to SQL tables using a set of TableProviders constructed from a TableProviderFactory. 2. This class is largely a mux that delegates requests to the appropriate TableProvider based on the requested TableName.

    • Constructor Detail

      • AwsCmdbRecordHandler

        public AwsCmdbRecordHandler​(Map<String,​String> configOptions)
      • AwsCmdbRecordHandler

        protected AwsCmdbRecordHandler​(software.amazon.awssdk.services.s3.S3Client amazonS3,
                                       software.amazon.awssdk.services.secretsmanager.SecretsManagerClient secretsManager,
                                       software.amazon.awssdk.services.athena.AthenaClient athena,
                                       TableProviderFactory tableProviderFactory,
                                       Map<String,​String> configOptions)
    • Method Detail

      • readWithConstraint

        protected void readWithConstraint​(BlockSpiller blockSpiller,
                                          ReadRecordsRequest readRecordsRequest,
                                          QueryStatusChecker queryStatusChecker)
        Delegates to the TableProvider that is registered for the requested table.
        Specified by:
        readWithConstraint in class RecordHandler
        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
        See Also:
        RecordHandler