Class HbaseRecordHandler

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

    public class HbaseRecordHandler
    extends RecordHandler
    Handles data read record requests for the Athena HBase Connector.

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

    1. Supporting String and native 'byte[]' storage. 2. Attempts to resolve sensitive configuration fields such as HBase connection string via SecretsManager so that you can substitute variables with values from by doing something like hostname:port:password=${my_secret}

    • Constructor Detail

      • HbaseRecordHandler

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

        protected HbaseRecordHandler​(com.amazonaws.services.s3.AmazonS3 amazonS3,
                                     com.amazonaws.services.secretsmanager.AWSSecretsManager secretsManager,
                                     com.amazonaws.services.athena.AmazonAthena athena,
                                     HbaseConnectionFactory connectionFactory,
                                     Map<String,​String> configOptions)
    • Method Detail

      • readWithConstraint

        protected void readWithConstraint​(BlockSpiller blockSpiller,
                                          ReadRecordsRequest request,
                                          QueryStatusChecker queryStatusChecker)
                                   throws IOException
        Scans HBase using the scan settings set on the requested Split by HbaseMetadataHandler.
        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.
        request - 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:
        IOException
        See Also:
        RecordHandler