Search in sources :

Example 1 with DeleteTableResult

use of com.amazonaws.services.dynamodbv2.model.DeleteTableResult in project gora by apache.

the class DynamoDBStore method executeDeleteTableRequest.

/**
   * Executes a delete table request using the DynamoDB client
   * 
   * @param pTableName
   */
public void executeDeleteTableRequest(String pTableName) {
    try {
        DeleteTableRequest deleteTableRequest = new DeleteTableRequest().withTableName(pTableName);
        DeleteTableResult result = getDynamoDBClient().deleteTable(deleteTableRequest);
        waitForTableToBeDeleted(pTableName);
        LOG.debug("Schema: " + result.getTableDescription() + " deleted successfully.");
    } catch (Exception e) {
        LOG.debug("Schema: {} deleted.", pTableName, e.getMessage());
        throw new RuntimeException(e);
    }
}
Also used : DeleteTableRequest(com.amazonaws.services.dynamodbv2.model.DeleteTableRequest) DeleteTableResult(com.amazonaws.services.dynamodbv2.model.DeleteTableResult) GoraException(org.apache.gora.util.GoraException) AmazonServiceException(com.amazonaws.AmazonServiceException) IOException(java.io.IOException) ResourceNotFoundException(com.amazonaws.services.dynamodbv2.model.ResourceNotFoundException)

Aggregations

AmazonServiceException (com.amazonaws.AmazonServiceException)1 DeleteTableRequest (com.amazonaws.services.dynamodbv2.model.DeleteTableRequest)1 DeleteTableResult (com.amazonaws.services.dynamodbv2.model.DeleteTableResult)1 ResourceNotFoundException (com.amazonaws.services.dynamodbv2.model.ResourceNotFoundException)1 IOException (java.io.IOException)1 GoraException (org.apache.gora.util.GoraException)1