AmazonS3Client s3service = Utils.openService(props);
Backend backend = ds.getBackend();
String bucket = ((S3Backend)backend).getBucket();
LOG.info("delete bucket [" + bucket + "]");
TransferManager tmx = new TransferManager(s3service);
if (s3service.doesBucketExist(bucket)) {
for (int i = 0; i < 3; i++) {
tmx.abortMultipartUploads(bucket, startTime);
ObjectListing prevObjectListing = s3service.listObjects(bucket);
while (prevObjectListing != null ) {
List<DeleteObjectsRequest.KeyVersion> deleteList = new ArrayList<DeleteObjectsRequest.KeyVersion>();