Examples of DescribeTableRequest


Examples of com.amazonaws.services.dynamodbv2.model.DescribeTableRequest

  @Test
  public void describeTableWithoutTableName() {
    createTable();
    boolean wasError = false;
    try {
      DescribeTableResult res = getClient().describeTable(new DescribeTableRequest());
      wasError = res.getTable() == null;
    } catch (Exception e) {
      wasError = true;
    }
    Assert.assertTrue(wasError);
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.DescribeTableRequest

     * @return True if a table already exists with the specified name, otherwise
     *         false.
     */
    public static boolean doesTableExist(AmazonDynamoDB dynamo, String tableName) {
        try {
            TableDescription table = dynamo.describeTable(new DescribeTableRequest(tableName)).getTable();
            return TableStatus.ACTIVE.toString().equals(table.getTableStatus());
        } catch (ResourceNotFoundException rnfe) {
            // This means the table doesn't exist in the account yet
            return false;
        }
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.DescribeTableRequest

    public static void waitForTableToBecomeActive(AmazonDynamoDB dynamo, String tableName) {
        long startTime = System.currentTimeMillis();
        long endTime = startTime + (10 * 60 * 1000);
        while (System.currentTimeMillis() < endTime) {
            try {
                TableDescription table = dynamo.describeTable(new DescribeTableRequest(tableName)).getTable();
                if (table != null && table.getTableStatus().equals(TableStatus.ACTIVE.toString()))
                    return;
            } catch (ResourceNotFoundException rnfe) {
                // ResourceNotFound means the table doesn't exist yet,
                // so ignore this error and just keep polling.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.