Package org.apache.druid.storage.azure
Class AzureStorage
- java.lang.Object
-
- org.apache.druid.storage.azure.AzureStorage
-
public class AzureStorage extends Object
Abstracts the Azure storage layer. Makes direct calls to Azure file system.
-
-
Constructor Summary
Constructors Constructor Description AzureStorage(com.google.common.base.Supplier<com.microsoft.azure.storage.blob.CloudBlobClient> cloudBlobClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>emptyCloudBlobDirectory(String containerName, String virtualDirPath)booleangetBlobExists(String container, String blobPath)InputStreamgetBlobInputStream(long offset, String containerName, String blobPath)InputStreamgetBlobInputStream(String containerName, String blobPath)longgetBlobLength(String containerName, String blobPath)com.microsoft.azure.storage.blob.CloudBlobgetBlobReferenceWithAttributes(String containerName, String blobPath)voiduploadBlob(File file, String containerName, String blobPath)
-
-
-
Method Detail
-
emptyCloudBlobDirectory
public List<String> emptyCloudBlobDirectory(String containerName, String virtualDirPath) throws com.microsoft.azure.storage.StorageException, URISyntaxException
- Throws:
com.microsoft.azure.storage.StorageExceptionURISyntaxException
-
uploadBlob
public void uploadBlob(File file, String containerName, String blobPath) throws IOException, com.microsoft.azure.storage.StorageException, URISyntaxException
- Throws:
IOExceptioncom.microsoft.azure.storage.StorageExceptionURISyntaxException
-
getBlobReferenceWithAttributes
public com.microsoft.azure.storage.blob.CloudBlob getBlobReferenceWithAttributes(String containerName, String blobPath) throws URISyntaxException, com.microsoft.azure.storage.StorageException
- Throws:
URISyntaxExceptioncom.microsoft.azure.storage.StorageException
-
getBlobLength
public long getBlobLength(String containerName, String blobPath) throws URISyntaxException, com.microsoft.azure.storage.StorageException
- Throws:
URISyntaxExceptioncom.microsoft.azure.storage.StorageException
-
getBlobInputStream
public InputStream getBlobInputStream(String containerName, String blobPath) throws URISyntaxException, com.microsoft.azure.storage.StorageException
- Throws:
URISyntaxExceptioncom.microsoft.azure.storage.StorageException
-
getBlobInputStream
public InputStream getBlobInputStream(long offset, String containerName, String blobPath) throws URISyntaxException, com.microsoft.azure.storage.StorageException
- Throws:
URISyntaxExceptioncom.microsoft.azure.storage.StorageException
-
getBlobExists
public boolean getBlobExists(String container, String blobPath) throws URISyntaxException, com.microsoft.azure.storage.StorageException
- Throws:
URISyntaxExceptioncom.microsoft.azure.storage.StorageException
-
-