Examples of DescribeTableRequest


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

    long startTime = System.currentTimeMillis();
    long endTime = startTime + waitTime;
    while (System.currentTimeMillis() < endTime) {
      try {Thread.sleep(sleepDeleteTime);} catch (Exception e) {}
      try {
        DescribeTableRequest request = new DescribeTableRequest().withTableName(pTableName);
        TableDescription tableDescription = dynamoDBClient.describeTable(request).getTable();
        String tableStatus = tableDescription.getTableStatus();
        LOG.debug(pTableName + " - current state: " + tableStatus);
      } catch (AmazonServiceException ase) {
        if (ase.getErrorCode().equalsIgnoreCase("ResourceNotFoundException") == true)
View Full Code Here

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

    long startTime = System.currentTimeMillis();
    long endTime = startTime + waitTime;
    while (System.currentTimeMillis() < endTime) {
      try {Thread.sleep(sleepTime);} catch (Exception e) {}
      try {
        DescribeTableRequest request = new DescribeTableRequest().withTableName(tableName);
        TableDescription tableDescription = dynamoDBClient.describeTable(request).getTable();
        String tableStatus = tableDescription.getTableStatus();
        LOG.debug(tableName + " - current state: " + tableStatus);
        if (tableStatus.equals(TableStatus.ACTIVE.toString())) return;
      } catch (AmazonServiceException ase) {
View Full Code Here

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

   * @return
   */
  private TableDescription getTableSchema(String tableName){
    TableDescription tableDescription = null;
    try{
      DescribeTableRequest describeTableRequest = new DescribeTableRequest().withTableName(tableName);
      tableDescription = dynamoDBClient.describeTable(describeTableRequest).getTable();
    }
    catch(ResourceNotFoundException e){
      LOG.error("Error while getting table schema: " + tableName);
      return tableDescription;
View Full Code Here

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

        AmazonDynamoDB ddbClient = getDdbClient();
        String tableName = getConfiguration().getTableName();
        LOG.trace("Querying whether table [{}] already exists...", tableName);

        try {
            DescribeTableRequest request = new DescribeTableRequest().withTableName(tableName);
            TableDescription tableDescription = ddbClient.describeTable(request).getTable();
            if (!isTableActive(tableDescription)) {
                waitForTableToBecomeAvailable(tableName);
            }
View Full Code Here

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

                Thread.sleep(1000 * 5);
                waitTime -= 5000;
            } catch (Exception e) {
            }
            try {
                DescribeTableRequest request = new DescribeTableRequest().withTableName(tableName);
                TableDescription tableDescription = getDdbClient().describeTable(request).getTable();
                if (isTableActive(tableDescription)) {
                    LOG.trace("Table [{}] became active", tableName);
                    return;
                }
View Full Code Here

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

        super(ddbClient, configuration, exchange);
    }

    @Override
    public void execute() {
        DescribeTableResult result = ddbClient.describeTable(new DescribeTableRequest()
                .withTableName(determineTableName()));

        Message msg = getMessageForResponse(exchange);
        msg.setHeader(DdbConstants.TABLE_NAME, result.getTable().getTableName());
        msg.setHeader(DdbConstants.TABLE_STATUS, result.getTable().getTableStatus());
View Full Code Here

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

    long startTime = System.currentTimeMillis();
    long endTime = startTime + waitTime;
    while (System.currentTimeMillis() < endTime) {
      try {Thread.sleep(sleepDeleteTime);} catch (Exception e) {}
      try {
        DescribeTableRequest request = new DescribeTableRequest().withTableName(pTableName);
        TableDescription tableDescription = dynamoDBClient.describeTable(request).getTable();
        String tableStatus = tableDescription.getTableStatus();
        LOG.debug(pTableName + " - current state: " + tableStatus);
      } catch (AmazonServiceException ase) {
        if (ase.getErrorCode().equalsIgnoreCase("ResourceNotFoundException") == true)
View Full Code Here

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

    long startTime = System.currentTimeMillis();
    long endTime = startTime + waitTime;
    while (System.currentTimeMillis() < endTime) {
      try {Thread.sleep(sleepTime);} catch (Exception e) {}
      try {
        DescribeTableRequest request = new DescribeTableRequest().withTableName(tableName);
        TableDescription tableDescription = dynamoDBClient.describeTable(request).getTable();
        String tableStatus = tableDescription.getTableStatus();
        LOG.debug(tableName + " - current state: " + tableStatus);
        if (tableStatus.equals(TableStatus.ACTIVE.toString())) return;
      } catch (AmazonServiceException ase) {
View Full Code Here

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

   * @return
   */
  private TableDescription getTableSchema(String tableName){
    TableDescription tableDescription = null;
    try{
      DescribeTableRequest describeTableRequest = new DescribeTableRequest().withTableName(tableName);
      tableDescription = dynamoDBClient.describeTable(describeTableRequest).getTable();
    }
    catch(ResourceNotFoundException e){
      LOG.error("Error while getting table schema: " + tableName);
      return tableDescription;
View Full Code Here

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

       
        String tableName = getConfiguration().getTableName();
        LOG.trace("Querying whether table [{}] already exists...", tableName);

        try {
            DescribeTableRequest request = new DescribeTableRequest().withTableName(tableName);
            TableDescription tableDescription = ddbClient.describeTable(request).getTable();
            if (!isTableActive(tableDescription)) {
                waitForTableToBecomeAvailable(tableName);
            }
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.