jasperjiaguo commented on code in PR #8753:
URL: https://github.com/apache/pinot/pull/8753#discussion_r892654226


##########
pinot-common/src/main/java/org/apache/pinot/common/utils/fetcher/HttpSegmentFetcher.java:
##########
@@ -90,6 +91,54 @@ public void fetchSegmentToLocal(URI downloadURI, File dest)
     });
   }
 
+  @Override
+  public File fetchUntarSegmentToLocalStreamed(URI downloadURI, File dest, 
long rateLimit)
+      throws Exception {
+    // Create a RoundRobinURIProvider to round robin IP addresses when retry 
uploading. Otherwise may always try to
+    // download from a same broken host as: 1) DNS may not RR the IP addresses 
2) OS cache the DNS resolution result.
+    RoundRobinURIProvider uriProvider = new RoundRobinURIProvider(downloadURI);
+    int retryCount = Math.max(_retryCount, uriProvider.numAddresses());
+    AtomicReference<File> ret = new AtomicReference<>(); // return the untared 
segment directory

Review Comment:
   The ret used in Lambda must be effective final



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