VladRodionov commented on code in PR #8353:
URL: https://github.com/apache/hbase/pull/8353#discussion_r3418023495
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java:
##########
@@ -1336,9 +1346,8 @@ public HFileBlock readBlock(long dataBlockOffset, long
onDiskBlockSize, final bo
// the other choice is to duplicate work (which the cache would prevent you
// from doing).
- BlockCacheKey cacheKey =
- new BlockCacheKey(path, dataBlockOffset, this.isPrimaryReplicaReader(),
expectedBlockType);
-
+ BlockCacheKey cacheKey = new BlockCacheKey(path.getName(), family, region,
dataBlockOffset,
Review Comment:
A bit off top, I am really surprised that that parsing qualified file name
can be expensive at all, but you see that in your benchmarks. Q: why did not
you cache file name in this case? path.getName()?
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheKey.java:
##########
@@ -105,17 +104,18 @@ public BlockCacheKey(String hfileName, String cfName,
String regionName, long of
/**
* Construct a new BlockCacheKey using a file path. File, column family and
region information
- * will be extracted from the passed path. This should be used when
inserting keys into the cache,
- * so that region cache metrics are recorded properly.
+ * will be extracted from the passed path, so that region cache metrics are
recorded properly/
Review Comment:
nit: properly
--
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]