File tree 1 file changed +7
-3
lines changed
src/main/java/org/elasticsearch/cloud/aws/blobstore
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 19
19
20
20
package org .elasticsearch .cloud .aws .blobstore ;
21
21
22
+ import com .amazonaws .AmazonClientException ;
22
23
import com .amazonaws .services .s3 .model .AmazonS3Exception ;
23
24
import com .amazonaws .services .s3 .model .ObjectListing ;
24
25
import com .amazonaws .services .s3 .model .S3Object ;
@@ -68,9 +69,12 @@ public boolean blobExists(String blobName) {
68
69
}
69
70
70
71
@ 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
+ }
74
78
}
75
79
76
80
@ Override
You can’t perform that action at this time.
0 commit comments