Repository: hive
Updated Branches:
  refs/heads/master d35ad0677 -> 9a90c65d7


HIVE-14648: LLAP: Avoid private pages in the SSD cache (Gopal V, reviewed by 
Sergey Shelukhin)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/9a90c65d
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/9a90c65d
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/9a90c65d

Branch: refs/heads/master
Commit: 9a90c65d70b8eb68bb575928ef233d57e589a7b0
Parents: d35ad06
Author: Gopal V <gop...@apache.org>
Authored: Sat Aug 27 01:27:24 2016 -0700
Committer: Gopal V <gop...@apache.org>
Committed: Sat Aug 27 01:27:24 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hive/llap/cache/BuddyAllocator.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/9a90c65d/llap-server/src/java/org/apache/hadoop/hive/llap/cache/BuddyAllocator.java
----------------------------------------------------------------------
diff --git 
a/llap-server/src/java/org/apache/hadoop/hive/llap/cache/BuddyAllocator.java 
b/llap-server/src/java/org/apache/hadoop/hive/llap/cache/BuddyAllocator.java
index b03927a..0c53779 100644
--- a/llap-server/src/java/org/apache/hadoop/hive/llap/cache/BuddyAllocator.java
+++ b/llap-server/src/java/org/apache/hadoop/hive/llap/cache/BuddyAllocator.java
@@ -340,7 +340,9 @@ public final class BuddyAllocator implements 
EvictionAwareAllocator, BuddyAlloca
         File rf = File.createTempFile("arena-", ".cache", cacheDir.toFile());
         RandomAccessFile rwf = new RandomAccessFile(rf, "rw");
         rwf.setLength(arenaSize); // truncate (TODO: posix_fallocate?)
-        ByteBuffer rwbuf = rwf.getChannel().map(MapMode.PRIVATE, 0, arenaSize);
+        // Use RW, not PRIVATE because the copy-on-write is irrelevant for a 
deleted file
+        // see discussion in YARN-5551 for the memory accounting discussion
+        ByteBuffer rwbuf = rwf.getChannel().map(MapMode.READ_WRITE, 0, 
arenaSize);
         // A mapping, once established, is not dependent upon the file channel 
that was used to
         // create it. delete file and hold onto the map
         rwf.close();

Reply via email to