private void createTable()

in src/main/java/com/netflix/bdp/s3mper/metastore/impl/DynamoDBMetastore.java [146:168]


    private void createTable() {
        log.info("Creating table in DynamoDB: " + tableName);
        
        CreateTableRequest createRequest = new CreateTableRequest();
        createRequest.withTableName(tableName);
        
        //Key
        KeySchemaElement pathKey = new KeySchemaElement().withAttributeName(HASH_KEY).withAttributeType(ScalarAttributeType.S);
        KeySchemaElement fileKey = new KeySchemaElement().withAttributeName(RANGE_KEY).withAttributeType(ScalarAttributeType.S);
        KeySchema schema = new KeySchema();
        schema.setHashKeyElement(pathKey);
        schema.setRangeKeyElement(fileKey);
        createRequest.setKeySchema(schema);
        
        //Throughput
        ProvisionedThroughput tp = new ProvisionedThroughput();
        tp.setReadCapacityUnits(readUnits);
        tp.setWriteCapacityUnits(writeUnits);
        
        createRequest.setProvisionedThroughput(tp);
        
        db.createTable(createRequest);
    }