for (Key key : keys) {
batch.add(new WriteRequest().withDeleteRequest(new DeleteRequest().withKey(key)));
}
BatchWriteItemRequest batchRequest = new BatchWriteItemRequest();
Map<String, List<WriteRequest>> itemRequests = new HashMap<String, List<WriteRequest>>();
itemRequests.put(MetastoreJanitor.tableName, batch);
batchRequest.setRequestItems(itemRequests);
BatchWriteItemResult result = db.batchWriteItem(batchRequest);
//Resubmit failed writes
for (Map.Entry<String, List<WriteRequest>> e : result.getUnprocessedItems().entrySet()) {