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)
boolean
getBlobExists(String container, String blobPath)
InputStream
getBlobInputStream(long offset, String containerName, String blobPath)
InputStream
getBlobInputStream(String containerName, String blobPath)
long
getBlobLength(String containerName, String blobPath)
com.microsoft.azure.storage.blob.CloudBlob
getBlobReferenceWithAttributes(String containerName, String blobPath)
void
uploadBlob(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.StorageException
URISyntaxException
-
uploadBlob
public void uploadBlob(File file, String containerName, String blobPath) throws IOException, com.microsoft.azure.storage.StorageException, URISyntaxException
- Throws:
IOException
com.microsoft.azure.storage.StorageException
URISyntaxException
-
getBlobReferenceWithAttributes
public com.microsoft.azure.storage.blob.CloudBlob getBlobReferenceWithAttributes(String containerName, String blobPath) throws URISyntaxException, com.microsoft.azure.storage.StorageException
- Throws:
URISyntaxException
com.microsoft.azure.storage.StorageException
-
getBlobLength
public long getBlobLength(String containerName, String blobPath) throws URISyntaxException, com.microsoft.azure.storage.StorageException
- Throws:
URISyntaxException
com.microsoft.azure.storage.StorageException
-
getBlobInputStream
public InputStream getBlobInputStream(String containerName, String blobPath) throws URISyntaxException, com.microsoft.azure.storage.StorageException
- Throws:
URISyntaxException
com.microsoft.azure.storage.StorageException
-
getBlobInputStream
public InputStream getBlobInputStream(long offset, String containerName, String blobPath) throws URISyntaxException, com.microsoft.azure.storage.StorageException
- Throws:
URISyntaxException
com.microsoft.azure.storage.StorageException
-
getBlobExists
public boolean getBlobExists(String container, String blobPath) throws URISyntaxException, com.microsoft.azure.storage.StorageException
- Throws:
URISyntaxException
com.microsoft.azure.storage.StorageException
-
-