Update S3BlobContainer because BlobContainer changed

See elasticsearch/elasticsearch#8366
This commit is contained in:
tlrx 2014-11-07 09:52:38 +01:00
parent 3cfb2df686
commit 4be25988d1
1 changed files with 7 additions and 3 deletions

View File

@ -19,6 +19,7 @@
package org.elasticsearch.cloud.aws.blobstore;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.s3.model.AmazonS3Exception;
import com.amazonaws.services.s3.model.ObjectListing;
import com.amazonaws.services.s3.model.S3Object;
@ -68,9 +69,12 @@ public class S3BlobContainer extends AbstractBlobContainer {
}
@Override
public boolean deleteBlob(String blobName) throws IOException {
blobStore.client().deleteObject(blobStore.bucket(), buildKey(blobName));
return true;
public void deleteBlob(String blobName) throws IOException {
try {
blobStore.client().deleteObject(blobStore.bucket(), buildKey(blobName));
} catch (AmazonClientException e) {
throw new IOException("Exception when deleting blob [" + blobName + "]", e);
}
}
@Override