use of com.amazonaws.services.dynamodbv2.model.DeleteTableRequest in project aws-doc-sdk-examples by awsdocs.
the class LowLevelParallelScan method deleteTable.
private static void deleteTable(String tableName) {
try {
DeleteTableRequest request = new DeleteTableRequest().withTableName(tableName);
client.deleteTable(request);
} catch (AmazonServiceException ase) {
System.err.println("Failed to delete table " + tableName + " " + ase);
}
}
use of com.amazonaws.services.dynamodbv2.model.DeleteTableRequest in project aws-doc-sdk-examples by awsdocs.
the class LowLevelTableExample method deleteExampleTable.
static void deleteExampleTable() {
DeleteTableRequest deleteTableRequest = new DeleteTableRequest().withTableName(tableName);
client.deleteTable(deleteTableRequest);
waitForTableToBeDeleted(tableName);
}
use of com.amazonaws.services.dynamodbv2.model.DeleteTableRequest 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);
}
}
Aggregations