Class RedisRecordHandler

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

    public class RedisRecordHandler
    extends RecordHandler
    Handles data read record requests for the Athena Redis Connector.

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

    1. Supporting literal, zset, and hash value types. 2. Attempts to resolve sensitive configuration fields such as redis-endpoint via SecretsManager so that you can substitute variables with values from by doing something like hostname:port:password=${my_secret}

    • Constructor Detail

      • RedisRecordHandler

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

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

      • readWithConstraint

        protected void readWithConstraint​(BlockSpiller spiller,
                                          ReadRecordsRequest recordsRequest,
                                          QueryStatusChecker queryStatusChecker)
        Description copied from class: RecordHandler
        A more stream lined option for reading the row data associated with the provided Split. This method differs from doReadRecords(...) in that the SDK handles more of the request lifecycle, leaving you to focus more closely on the task of actually reading from your source.
        Specified by:
        readWithConstraint in class RecordHandler
        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 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