Jackie-Jiang commented on code in PR #13964:
URL: https://github.com/apache/pinot/pull/13964#discussion_r1752771129


##########
pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/BaseMultipleSegmentsConversionExecutor.java:
##########
@@ -200,30 +200,24 @@ public List<SegmentConversionResult> 
executeTask(PinotTaskConfig pinotTaskConfig
 
       for (int i = 0; i < downloadURLs.length; i++) {
         String segmentName = segmentNames[i];
-        // Download the segment file
+        // Download and decompress the segment file
         _eventObserver.notifyProgress(_pinotTaskConfig,
-            String.format("Downloading segment from: %s (%d out of %d)", 
downloadURLs[i], (i + 1),
+            String.format("Downloading and decompressing segment from: %s (%d 
out of %d)", downloadURLs[i], (i + 1),
                 downloadURLs.length));
-        File tarredSegmentFile = new File(tempDataDir, "tarredSegmentFile_" + 
i);
+        File indexDir;
         try {
-          downloadSegmentToLocal(tableNameWithType, segmentName, 
downloadURLs[i], taskType, tarredSegmentFile);
+          indexDir = downloadSegmentToLocalAndUntar(tableNameWithType, 
segmentName, downloadURLs[i], taskType,
+              tempDataDir, "_" + i);
+          if (indexDir == null) {

Review Comment:
   Suggest directly let `downloadSegmentToLocalAndUntar()` throw exception 
instead of relying on `null` to pass the error. It will be very hard to debug 
when it returns `null` and we catch the exception with only `Unable to download 
and unter ...` in the error message



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