class MarsDynamoDBManager {

    public static void createImageTable(final AmazonDynamoDB dynamoDB, final String tableName,
        final ProvisionedThroughput tableProvisionedThroughput,
        final ProvisionedThroughput timeGSIProvisionedThroughput,
        final ProvisionedThroughput voteGSIProvisionedThroughput) {
        // Set up time GSI
        final GlobalSecondaryIndex timeGSI = new GlobalSecondaryIndex();
        timeGSI.setIndexName(IMAGE_TABLE_TIME_GSI_NAME);
        timeGSI.setKeySchema(Arrays.asList(IMAGE_TABLE_TIME_GSI_HASH_KSE, IMAGE_TABLE_TIME_GSI_RANGE_KSE));
        timeGSI.setProjection(IMAGE_TABLE_TIME_GSI_PROJECTION);
        timeGSI.setProvisionedThroughput(timeGSIProvisionedThroughput);
        // Set up vote GSI
        final GlobalSecondaryIndex voteGSI = new GlobalSecondaryIndex();
        voteGSI.setIndexName(IMAGE_TABLE_VOTE_GSI_NAME);
        voteGSI.setKeySchema(Arrays.asList(IMAGE_TABLE_VOTE_GSI_HASH_KSE, IMAGE_TABLE_VOTE_GSI_RANGE_KSE));
        voteGSI.setProjection(IMAGE_TABLE_VOTE_GSI_PROJECTION);
        voteGSI.setProvisionedThroughput(voteGSIProvisionedThroughput);
        // Create table
        final CreateTableRequest request = new CreateTableRequest();
        request.setAttributeDefinitions(IMAGE_TABLE_ATTRIBUTE_DEFINITIONS);
        request.setKeySchema(IMAGE_TABLE_KEY_SCHEMA);
        request.setGlobalSecondaryIndexes(Arrays.asList(timeGSI, voteGSI));
        request.setProvisionedThroughput(tableProvisionedThroughput);
        request.setTableName(tableName);
        LOGGER.info("Creating image table: " + request);
        final TableDescription result = DynamoDBManager.createTable(dynamoDB, request);
        LOGGER.info("Image table successfully created: " + result);
    }

    private  MarsDynamoDBManager();

}