openinx commented on a change in pull request #320: HBASE-21879 Read HFile's 
block to ByteBuffer directly instead of to byte for reducing young gc purpose
URL: https://github.com/apache/hbase/pull/320#discussion_r295826960
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java
 ##########
 @@ -481,7 +512,14 @@ private long updateSizeMetrics(LruCachedBlock cb, boolean 
evict) {
   @Override
   public Cacheable getBlock(BlockCacheKey cacheKey, boolean caching, boolean 
repeat,
       boolean updateCacheMetrics) {
-    LruCachedBlock cb = map.get(cacheKey);
+    LruCachedBlock cb = map.computeIfPresent(cacheKey, (key, val) -> {
 
 Review comment:
   Yeah, checked this before.  the map is ConcurrentHashMap, maybe we should 
define it as a ConcurrentHashMap explicitly. will address this in HBASE-22612.

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

Reply via email to