odraese commented on a change in pull request #626: [HIVE-21686] ensure that 
memory allocator does not evict using brute …
URL: https://github.com/apache/hive/pull/626#discussion_r283427735
 
 

 ##########
 File path: 
llap-server/src/java/org/apache/hadoop/hive/llap/cache/BuddyAllocator.java
 ##########
 @@ -65,19 +83,26 @@
   private final long maxSize;
   private final boolean isDirect;
   private final boolean isMapped;
+  private final int maxForcedEvictionSize;
   private final Path cacheDir;
 
   // These are only used for tests.
   private boolean enableDefragShortcut = true, oomLogging = true;
 
   // We don't know the acceptable size for Java array, so we'll use 1Gb 
boundary.
   // That is guaranteed to fit any maximum allocation.
-  private static final int MAX_ARENA_SIZE = 1024*1024*1024;
+  private static final int MAX_ARENA_SIZE = 1024 * 1024 * 1024;
   // Don't try to operate with less than MIN_SIZE allocator space, it will 
just give you grief.
-  private static final int MIN_TOTAL_MEMORY_SIZE = 64*1024*1024;
+  private static final int MIN_TOTAL_MEMORY_SIZE = 64 * 1024 * 1024;
   // Maximum reasonable defragmentation headroom. Mostly kicks in on very 
small caches.
   private static final float MAX_DEFRAG_HEADROOM_FRACTION = 0.01f;
-
+  /**
+   * Max number of attempts to try allocations before giving up and move to 
forced evictions or/and freelist/brut
 
 Review comment:
   brut -> brute 
   Also, having some comment, explaining the forced eviction (brute force 
discards) or freeList would help.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to