use of org.apache.samza.system.azureblob.AzureBlobClientBuilder in project samza by apache.
the class AzureBlobSystemProducer method setupAzureContainer.
@VisibleForTesting
void setupAzureContainer() {
try {
BlobServiceAsyncClient storageClient = new AzureBlobClientBuilder(systemName, AZURE_URL, config).getBlobServiceAsyncClient();
validateFlushThresholdSizeSupported(storageClient);
containerAsyncClient = storageClient.getBlobContainerAsyncClient(systemName);
// Only way to check if container exists or not is by creating it and look for failure/success.
createContainerIfNotExists(containerAsyncClient);
} catch (Exception e) {
metrics.updateAzureContainerMetrics();
throw new SystemProducerException("Failed to set up Azure container for SystemName: " + systemName, e);
}
}
Aggregations