jadami10 commented on code in PR #9710:
URL: https://github.com/apache/pinot/pull/9710#discussion_r1024166478


##########
pinot-common/src/main/java/org/apache/pinot/common/utils/fetcher/SegmentFetcherFactory.java:
##########
@@ -196,4 +206,21 @@ private void fetchAndDecryptSegmentToLocalInternal(String 
uri, File dest, String
       crypter.decrypt(tempDownloadedFile, dest);
     }
   }
+
+  private void fetchAndDecryptSegmentToLocalInternal(@NonNull List<URI> uris, 
File dest, String crypterName)
+          throws Exception {
+    Preconditions.checkArgument(!uris.isEmpty(), "empty uris passed into the 
fetchAndDecryptSegmentToLocalInternal");
+    URI uri = uris.get(RANDOM.nextInt(uris.size()));

Review Comment:
   these are all the peer URIs, and you're randomly selecting one? If so, this 
feels like it should just live in the calling function to this. No need to 
duplicate the `fetch` functions here just to get a random selector in



##########
pinot-core/pom.xml:
##########
@@ -218,7 +218,7 @@
     </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
-      <artifactId>mockito-core</artifactId>
+      <artifactId>mockito-inline</artifactId>

Review Comment:
   was there something you needed from this that core couldn't achieve?



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