You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/12/17 23:02:38 UTC

[GitHub] [accumulo] ctubbsii commented on a change in pull request #1462: Temporarily cache existence of recovery wals

ctubbsii commented on a change in pull request #1462: Temporarily cache existence of recovery wals
URL: https://github.com/apache/accumulo/pull/1462#discussion_r359075230
 
 

 ##########
 File path: server/master/src/main/java/org/apache/accumulo/master/recovery/RecoveryManager.java
 ##########
 @@ -132,6 +148,19 @@ private void initiateSort(String sortId, String source, final String destination
     log.info("Created zookeeper entry " + path + " with data " + work);
   }
 
+  private boolean exists(final Path path) throws IOException {
+    try {
+      return existenceCache.get(path, new Callable<Boolean>() {
+        @Override
+        public Boolean call() throws Exception {
+          return master.getFileSystem().exists(path);
+        }
+      });
 
 Review comment:
   Callable is also a functional interface:
   
   ```java
   return existenceCache.get(path, () -> master.getFileSystem().exists(path));
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services