Skip to content

Commit 4be2598

Browse files
committed
Update S3BlobContainer because BlobContainer changed
See elastic/elasticsearch#8366
1 parent 3cfb2df commit 4be2598

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/main/java/org/elasticsearch/cloud/aws/blobstore/S3BlobContainer.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
package org.elasticsearch.cloud.aws.blobstore;
2121

22+
import com.amazonaws.AmazonClientException;
2223
import com.amazonaws.services.s3.model.AmazonS3Exception;
2324
import com.amazonaws.services.s3.model.ObjectListing;
2425
import com.amazonaws.services.s3.model.S3Object;
@@ -68,9 +69,12 @@ public boolean blobExists(String blobName) {
6869
}
6970

7071
@Override
71-
public boolean deleteBlob(String blobName) throws IOException {
72-
blobStore.client().deleteObject(blobStore.bucket(), buildKey(blobName));
73-
return true;
72+
public void deleteBlob(String blobName) throws IOException {
73+
try {
74+
blobStore.client().deleteObject(blobStore.bucket(), buildKey(blobName));
75+
} catch (AmazonClientException e) {
76+
throw new IOException("Exception when deleting blob [" + blobName + "]", e);
77+
}
7478
}
7579

7680
@Override

0 commit comments

Comments
 (0)