georgew5656 commented on code in PR #15730:
URL: https://github.com/apache/druid/pull/15730#discussion_r1465449660


##########
extensions-core/azure-extensions/src/main/java/org/apache/druid/storage/azure/AzureStorage.java:
##########
@@ -173,9 +172,17 @@ public InputStream getBlockBlobInputStream(long offset, 
Long length, final Strin
   public void batchDeleteFiles(String containerName, Iterable<String> paths, 
Integer maxAttempts)
       throws BlobBatchStorageException
   {
-
-    BlobBatchClient blobBatchClient = new 
BlobBatchClientBuilder(getOrCreateBlobContainerClient(containerName, 
maxAttempts)).buildClient();
-    blobBatchClient.deleteBlobs(Lists.newArrayList(paths), 
DeleteSnapshotsOptionType.ONLY);
+    BlobContainerClient blobContainerClient = 
getOrCreateBlobContainerClient(containerName, maxAttempts);
+    List<String> blobUris = Streams.stream(paths).map(path -> 
blobContainerClient.getBlobContainerUrl() + "/" + 
path).collect(Collectors.toList());
+
+    // We have to call forEach on the response because this is the only way 
azure batch will throw an exception on a operation failure.
+    azureClientFactory.getBlobBatchClient(blobContainerClient).deleteBlobs(
+        blobUris,
+        DeleteSnapshotsOptionType.INCLUDE
+    ).forEach(response ->

Review Comment:
   if there are errors the unpacking actually throws a exception up the stack 
which gets logged



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to