bruno-roustant commented on a change in pull request #108:
URL: https://github.com/apache/solr/pull/108#discussion_r651628249



##########
File path: 
solr/contrib/blob-directory/src/java/org/apache/solr/blob/BlobDirectory.java
##########
@@ -61,20 +62,33 @@
   private final Object lock = new Object();
   private volatile boolean isOpen;
 
-  public BlobDirectory(Directory delegate, String blobDirPath, 
BlobStoreConnection blobStoreConnection) throws IOException {
+  public BlobDirectory(Directory delegate, String blobDirPath, BlobRepository 
blobRepository) throws IOException {
     super(delegate);
     this.blobDirPath = blobDirPath;
-    this.blobStoreConnection = blobStoreConnection;
+    this.blobRepository = blobRepository;
     pullMissingFilesFromRepo();
   }
 
   private void pullMissingFilesFromRepo() throws IOException {
     Set<String> localFileNames = new HashSet<>(Arrays.asList(in.listAll()));
-    blobStoreConnection.pull(blobDirPath, this::openOutput, blobFile -> {
-      //TODO: We could also check the size and checksum.
-      return !localFileNames.remove(blobFile.fileName());
+    MutableInt numPulledFiles = log.isInfoEnabled() ? new MutableInt() : null;

Review comment:
       I use a MutableInt to increment it inside the lambda expression for the 
file filter. I'll use log.isInfoEnabled() instead for the log, and I'll 
simplify to always create the MutableInt counter even if eventually it is not 
used because log info is not enabled.




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

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



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

Reply via email to