suneet-s commented on a change in pull request #9356: Add Azure config options 
for segment prefix and max listing length
URL: https://github.com/apache/druid/pull/9356#discussion_r380835990
 
 

 ##########
 File path: 
extensions-contrib/azure-extensions/src/main/java/org/apache/druid/storage/azure/AzureDataSegmentPusher.java
 ##########
 @@ -70,11 +73,12 @@ public String getPathForHadoop(String dataSource)
   public String getPathForHadoop()
   {
     String hadoopPath = StringUtils.format(
-        "%s://%s@%s.%s/",
-        AzureDataSegmentPuller.AZURE_STORAGE_HADOOP_PROTOCOL,
-        config.getContainer(),
-        config.getAccount(),
-        AzureDataSegmentPuller.AZURE_STORAGE_HOST_ADDRESS
+        "%s://%s@%s.%s/%s",
+        AzureUtils.AZURE_STORAGE_HADOOP_PROTOCOL,
+        segmentConfig.getContainer(),
+        accountConfig.getAccount(),
+        AzureUtils.AZURE_STORAGE_HOST_ADDRESS,
+        segmentConfig.getPrefix().isEmpty() ? "" : segmentConfig.getPrefix() + 
'/'
 
 Review comment:
   What if prefix ends with a `/` Is there a util that will build the path with 
only one separator at the end? Is there any harm if the path ends with two `/`

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to