You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/01/30 22:12:02 UTC

[GitHub] [druid] jihoonson commented on a change in pull request #9265: Improve code quality and unit test coverage of the Azure extension

jihoonson commented on a change in pull request #9265: Improve code quality and unit test coverage of the Azure extension
URL: https://github.com/apache/druid/pull/9265#discussion_r373218709
 
 

 ##########
 File path: extensions-contrib/azure-extensions/src/main/java/org/apache/druid/storage/azure/AzureStorage.java
 ##########
 @@ -95,13 +87,34 @@ public long getBlobLength(final String containerName, final String blobPath)
 
   public InputStream getBlobInputStream(final String containerName, final String blobPath)
       throws URISyntaxException, StorageException
+  {
+    return getBlobInputStream(0L, containerName, blobPath);
+  }
+
+  public InputStream getBlobInputStream(long offset, final String containerName, final String blobPath)
+      throws URISyntaxException, StorageException
   {
     CloudBlobContainer container = getCloudBlobContainer(containerName);
-    return container.getBlockBlobReference(blobPath).openInputStream();
+    return container.getBlockBlobReference(blobPath).openInputStream(offset, null, null, null, null);
   }
 
   public boolean getBlobExists(String container, String blobPath) throws URISyntaxException, StorageException
   {
     return getCloudBlobContainer(container).getBlockBlobReference(blobPath).exists();
   }
+
+  @VisibleForTesting
+  CloudBlobClient getCloudBlobClient()
+  {
+    return this.cloudBlobClient;
+  }
+
+  private CloudBlobContainer getCloudBlobContainer(final String containerName)
 
 Review comment:
   nit: this method not just returns a container, but can create it if it doesn't exist. Maybe better to rename to something more clear such as `getOrCreateCloudBlobContainer()`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org