chenboat commented on code in PR #12317:
URL: https://github.com/apache/pinot/pull/12317#discussion_r1476849074


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeTableDataManager.java:
##########
@@ -658,11 +656,10 @@ private void downloadSegmentFromPeer(String segmentName, 
String downloadScheme,
     try {
       tempRootDir = getTmpSegmentDataDir("tmp-" + segmentName + "." + 
System.currentTimeMillis());
       File segmentTarFile = new File(tempRootDir, segmentName + 
TarGzCompressionUtils.TAR_GZ_FILE_EXTENSION);
-      // First find servers hosting the segment in a ONLINE state.
-      List<URI> peerSegmentURIs = 
PeerServerSegmentFinder.getPeerServerURIs(segmentName, downloadScheme, 
_helixManager);
       // Next download the segment from a randomly chosen server using 
configured scheme.
-      
SegmentFetcherFactory.getSegmentFetcher(downloadScheme).fetchSegmentToLocal(peerSegmentURIs,
 segmentTarFile);
-      _logger.info("Fetched segment {} from: {} to: {} of size: {}", 
segmentName, peerSegmentURIs, segmentTarFile,
+      SegmentFetcherFactory.getSegmentFetcher(downloadScheme)
+          .fetchSegmentToLocal(segmentName, segmentTarFile, _helixManager, 
downloadScheme);

Review Comment:
   HelixManager represents the Pinot cluster controller and is used for 
data/segment discovery. So from this view, I am not too concerned about passing 
it to segment fetcher -- which is then use it for retryable segment discovery.  



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to