zachjsh 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_r373277488
 
 

 ##########
 File path: 
extensions-contrib/azure-extensions/src/main/java/org/apache/druid/storage/azure/AzureDataSegmentPusher.java
 ##########
 @@ -179,4 +151,36 @@ public DataSegment push(final File indexFilesDir, final 
DataSegment segment, fin
         uri.toString()
     );
   }
+
+  @VisibleForTesting
+  String getAzurePath(final DataSegment segment, final boolean useUniquePath)
+  {
+    final String storageDir = this.getStorageDir(segment, useUniquePath);
+
+    return StringUtils.format("%s/%s", storageDir, 
AzureStorageDruidModule.INDEX_ZIP_FILE_NAME);
+
+  }
+
+  @VisibleForTesting
+  DataSegment uploadDataSegment(
+      DataSegment segment,
+      final int binaryVersion,
+      final long size,
+      final File compressedSegmentData,
+      final String azurePath
+  )
+      throws StorageException, IOException, URISyntaxException
+  {
+    azureStorage.uploadBlob(compressedSegmentData, config.getContainer(), 
azurePath);
+
+    final DataSegment outSegment = segment
+        .withSize(size)
+        .withLoadSpec(this.makeLoadSpec(new URI(azurePath)))
+        .withBinaryVersion(binaryVersion);
+
+    log.info("Deleting file [%s]", compressedSegmentData);
 
 Review comment:
   fixed

----------------------------------------------------------------
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