Package com.amazonaws.services.dynamodb.model

Examples of com.amazonaws.services.dynamodb.model.CreateTableRequest


   * Executes a create table request using the DynamoDB client and waits
   * the default time until it's been created.
   * @param tableName
   */
  private void executeCreateTableRequest(String tableName){
    CreateTableRequest createTableRequest = getCreateTableRequest(tableName,
      mapping.getKeySchema(tableName), mapping.getProvisionedThroughput(tableName));
    // use the client to perform the request
    dynamoDBClient.createTable(createTableRequest).getTableDescription();
    // wait for table to become active
    waitForTableToBecomeAvailable(tableName);
View Full Code Here


   * @param keySchema
   * @param proThrou
   * @return
   */
  private CreateTableRequest getCreateTableRequest(String tableName, KeySchema keySchema, ProvisionedThroughput proThrou){
    CreateTableRequest createTableRequest = new CreateTableRequest();
    createTableRequest.setTableName(tableName);
    createTableRequest.setKeySchema(keySchema);
    createTableRequest.setProvisionedThroughput(proThrou);
    return createTableRequest;
  }
View Full Code Here

            LOG.trace("Table [{}] created", tableName);
        }
    }

    private TableDescription createTable(String tableName) {
        CreateTableRequest createTableRequest = new CreateTableRequest().withTableName(tableName)
                .withKeySchema(new KeySchema(
                        new KeySchemaElement().withAttributeName(
                                configuration.getKeyAttributeName())
                                .withAttributeType(configuration.getKeyAttributeType())))
                .withProvisionedThroughput(
View Full Code Here

   * Executes a create table request using the DynamoDB client and waits
   * the default time until it's been created.
   * @param tableName
   */
  private void executeCreateTableRequest(String tableName){
    CreateTableRequest createTableRequest = getCreateTableRequest(tableName,
      mapping.getKeySchema(tableName), mapping.getProvisionedThroughput(tableName));
    // use the client to perform the request
    dynamoDBClient.createTable(createTableRequest).getTableDescription();
    // wait for table to become active
    waitForTableToBecomeAvailable(tableName);
View Full Code Here

   * @param keySchema
   * @param proThrou
   * @return
   */
  private CreateTableRequest getCreateTableRequest(String tableName, KeySchema keySchema, ProvisionedThroughput proThrou){
    CreateTableRequest createTableRequest = new CreateTableRequest();
    createTableRequest.setTableName(tableName);
    createTableRequest.setKeySchema(keySchema);
    createTableRequest.setProvisionedThroughput(proThrou);
    return createTableRequest;
  }
View Full Code Here

            LOG.trace("Table [{}] created", tableName);
        }
    }

    private TableDescription createTable(String tableName) {
        CreateTableRequest createTableRequest = new CreateTableRequest().withTableName(tableName)
                .withKeySchema(new KeySchema(
                        new KeySchemaElement().withAttributeName(
                                configuration.getKeyAttributeName())
                                .withAttributeType(configuration.getKeyAttributeType())))
                .withProvisionedThroughput(
View Full Code Here

        key.setHashKeyElement(makeKeySchemaElement(idField));
        if (rangeField != null)
            key.setRangeKeyElement(makeKeySchemaElement(rangeField));

        ddbClient.createTable(new CreateTableRequest(table, key)
                              .withProvisionedThroughput(new ProvisionedThroughput()
                                                         .withReadCapacityUnits(readTP)
                                                         .withWriteCapacityUnits(writeTP)));
    }
View Full Code Here

   * Executes a create table request using the DynamoDB client and waits
   * the default time until it's been created.
   * @param tableName
   */
  private void executeCreateTableRequest(String tableName){
    CreateTableRequest createTableRequest = getCreateTableRequest(tableName,
      mapping.getKeySchema(tableName), mapping.getProvisionedThroughput(tableName));
    // use the client to perform the request
    dynamoDBClient.createTable(createTableRequest).getTableDescription();
    // wait for table to become active
    waitForTableToBecomeAvailable(tableName);
View Full Code Here

   * @param keySchema
   * @param proThrou
   * @return
   */
  private CreateTableRequest getCreateTableRequest(String tableName, KeySchema keySchema, ProvisionedThroughput proThrou){
    CreateTableRequest createTableRequest = new CreateTableRequest();
    createTableRequest.setTableName(tableName);
    createTableRequest.setKeySchema(keySchema);
    createTableRequest.setProvisionedThroughput(proThrou);
    return createTableRequest;
  }
View Full Code Here

     *
     */
    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);
    }
View Full Code Here

TOP

Related Classes of com.amazonaws.services.dynamodb.model.CreateTableRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.