|
@@ -33,7 +33,6 @@ import org.elasticsearch.threadpool.ThreadPool;
|
|
|
import java.io.IOException;
|
|
|
import java.io.InputStream;
|
|
|
import java.net.URISyntaxException;
|
|
|
-import java.nio.file.FileAlreadyExistsException;
|
|
|
import java.util.Collections;
|
|
|
import java.util.Map;
|
|
|
import java.util.concurrent.Executor;
|
|
@@ -88,11 +87,11 @@ public class AzureBlobStore implements BlobStore {
|
|
|
public void close() {
|
|
|
}
|
|
|
|
|
|
- public boolean blobExists(String blob) throws URISyntaxException, StorageException {
|
|
|
+ public boolean blobExists(String blob) throws URISyntaxException, StorageException, IOException {
|
|
|
return service.blobExists(clientName, container, blob);
|
|
|
}
|
|
|
|
|
|
- public void deleteBlob(String blob) throws URISyntaxException, StorageException {
|
|
|
+ public void deleteBlob(String blob) throws URISyntaxException, StorageException, IOException {
|
|
|
service.deleteBlob(clientName, container, blob);
|
|
|
}
|
|
|
|
|
@@ -106,17 +105,17 @@ public class AzureBlobStore implements BlobStore {
|
|
|
}
|
|
|
|
|
|
public Map<String, BlobMetaData> listBlobsByPrefix(String keyPath, String prefix)
|
|
|
- throws URISyntaxException, StorageException {
|
|
|
+ throws URISyntaxException, StorageException, IOException {
|
|
|
return service.listBlobsByPrefix(clientName, container, keyPath, prefix);
|
|
|
}
|
|
|
|
|
|
- public Map<String, BlobContainer> children(BlobPath path) throws URISyntaxException, StorageException {
|
|
|
+ public Map<String, BlobContainer> children(BlobPath path) throws URISyntaxException, StorageException, IOException {
|
|
|
return Collections.unmodifiableMap(service.children(clientName, container, path).stream().collect(
|
|
|
Collectors.toMap(Function.identity(), name -> new AzureBlobContainer(path.add(name), this, threadPool))));
|
|
|
}
|
|
|
|
|
|
public void writeBlob(String blobName, InputStream inputStream, long blobSize, boolean failIfAlreadyExists)
|
|
|
- throws URISyntaxException, StorageException, FileAlreadyExistsException {
|
|
|
+ throws URISyntaxException, StorageException, IOException {
|
|
|
service.writeBlob(this.clientName, container, blobName, inputStream, blobSize, failIfAlreadyExists);
|
|
|
}
|
|
|
}
|