rohityadav1993 commented on code in PR #18641:
URL: https://github.com/apache/pinot/pull/18641#discussion_r3464541273


##########
pinot-server/src/main/java/org/apache/pinot/server/predownload/PredownloadScheduler.java:
##########
@@ -336,6 +355,52 @@ void downloadSegment(PredownloadSegmentInfo 
predownloadSegmentInfo)
     }
   }
 
+  private void downloadFromDeepStore(PredownloadSegmentInfo 
predownloadSegmentInfo)
+      throws Exception {
+    File tempRootDir = getTmpSegmentDataDir(predownloadSegmentInfo);
+    if (_instanceDataManagerConfig.isStreamSegmentDownloadUntar()
+        && predownloadSegmentInfo.getCrypterName() == null) {
+      try {
+        File untaredSegDir = 
downloadAndStreamUntarWithRateLimit(predownloadSegmentInfo, tempRootDir,
+            
_instanceDataManagerConfig.getStreamSegmentDownloadUntarRateLimit());
+        moveSegment(predownloadSegmentInfo, untaredSegDir);
+      } finally {
+        FileUtils.deleteQuietly(tempRootDir);
+      }
+    } else {
+      try {
+        File tarFile = downloadAndDecrypt(predownloadSegmentInfo, tempRootDir);
+        untarAndMoveSegment(predownloadSegmentInfo, tarFile, tempRootDir);
+      } finally {
+        FileUtils.deleteQuietly(tempRootDir);
+      }
+    }
+  }
+
+  private void downloadFromPeers(PredownloadSegmentInfo predownloadSegmentInfo)

Review Comment:
   there are two modes of segment download in deepstoreDownload:
   1. download -> untar -> move
   2. streaming untar
   
   This method only supports former. Is it possible to handle the second 
mechanism as well.



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