wchevreuil commented on code in PR #8353:
URL: https://github.com/apache/hbase/pull/8353#discussion_r3413398788


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheKey.java:
##########
@@ -97,9 +96,9 @@ public BlockCacheKey(String hfileName, String cfName, String 
regionName, long of
     this.offset = offset;
     this.blockType = blockType;
     // Use string pool for file, region and cf values
-    this.hfileName = HFILE_NAME_POOL.intern(hfileName);
-    this.regionName = (regionName != null) ? 
REGION_NAME_POOL.intern(regionName) : null;
-    this.cfName = (cfName != null) ? CF_NAME_POOL.intern(cfName) : null;
+    this.hfileName = hfileName;

Review Comment:
   We are doing intern from readers and writers, we need those to access a 
single pool per file/region/cf. Since both reader and writer classes already 
reference BlockCacheKey, and the string re-use is relevant in the BlockCacheKey 
usage, I found it makes sense to keep the pools in the BlockCacheKey.



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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to