Class AwsContext


  • public final class AwsContext
    extends Object
    • Method Detail

      • create

        public static AwsContext create​(Configuration configuration)
                                 throws IOException
        Creates the context used to interact with AWS services.
        Parameters:
        configuration - The configuration used to initialize the context.
        Returns:
        The context.
        Throws:
        IOException
      • create

        public static AwsContext create​(com.amazonaws.services.s3.AmazonS3 s3,
                                        String bucketName,
                                        String rootDirectory,
                                        com.amazonaws.services.dynamodbv2.AmazonDynamoDB ddb,
                                        String journalTableName,
                                        String lockTableName)
                                 throws IOException
        Creates the context used to interact with AWS services.
        Parameters:
        s3 - Client for accessing Amazon S3.
        bucketName - Name for the bucket that will store segments.
        rootDirectory - The root directory under which the segment store is setup.
        ddb - Client for accessing Amazon DynamoDB.
        journalTableName - Name of table used for storing log entries for journal and gc. The table will be created if it doesn't already exist. It should have a partition key on "DynamoDBClient.TABLE_ATTR_FILENAME" and sort key on "DynamoDBClient.TABLE_ATTR_TIMESTAMP".
        lockTableName - Name of table used for managing the distributed lock. The table will be created if it doesn't already exist. It should have a partition key on "DynamoDBClient.LOCKTABLE_KEY".
        Returns:
        The context.
        Throws:
        IOException
      • create

        public static AwsContext create​(com.amazonaws.services.s3.AmazonS3 s3,
                                        String bucketName,
                                        String rootDirectory,
                                        com.amazonaws.services.dynamodbv2.AmazonDynamoDB ddb,
                                        String journalTableName,
                                        String lockTableName,
                                        DynamoDBProvisioningData provisioningData)
                                 throws IOException
        Creates the context used to interact with AWS services.
        Parameters:
        s3 - Client for accessing Amazon S3.
        bucketName - Name for the bucket that will store segments.
        rootDirectory - The root directory under which the segment store is setup.
        ddb - Client for accessing Amazon DynamoDB.
        journalTableName - Name of table used for storing log entries for journal and gc. The table will be created if it doesn't already exist. It should have a partition key on "DynamoDBClient.TABLE_ATTR_FILENAME" and sort key on "DynamoDBClient.TABLE_ATTR_TIMESTAMP".
        lockTableName - Name of table used for managing the distributed lock. The table will be created if it doesn't already exist. It should have a partition key on "DynamoDBClient.LOCKTABLE_KEY".
        provisioningData - DynamoDB provisioning data
        Returns:
        The context.
        Throws:
        IOException
      • setRemoteStoreMonitor

        public void setRemoteStoreMonitor​(RemoteStoreMonitor monitor)
      • getConfig

        public String getConfig()