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 2022/11/15 18:31:04 UTC

[GitHub] [accumulo] ctubbsii commented on a diff in pull request #3079: Wire up FSDataInputStream.setDropBehind, set to true in FileCompactor

ctubbsii commented on code in PR #3079:
URL: https://github.com/apache/accumulo/pull/3079#discussion_r1023132794


##########
core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java:
##########
@@ -83,8 +84,24 @@ public CachableBuilder conf(Configuration hadoopConf) {
     }
 
     public CachableBuilder fsPath(FileSystem fs, Path dataFile) {
+      return fsPath(fs, dataFile, false);
+    }
+
+    public CachableBuilder fsPath(FileSystem fs, Path dataFile, boolean dropCacheBehind) {
       this.cacheId = pathToCacheId(dataFile);
-      this.inputSupplier = () -> fs.open(dataFile);
+      this.inputSupplier = () -> {
+        FSDataInputStream is = fs.open(dataFile);
+        if (dropCacheBehind) {
+          // Tell the DataNode that the write ahead log does not need to be cached in the OS page
+          // cache
+          try {
+            is.setDropBehind(Boolean.TRUE);
+          } catch (IOException | UnsupportedOperationException e) {
+            log.debug("setDropBehind not enabled for wal file: {}", dataFile);

Review Comment:
   I'm wondering if it's useful to show the message from the exception in this debug message, at least in the case of IOException.



-- 
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: notifications-unsubscribe@accumulo.apache.org

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