taklwu commented on code in PR #7192:
URL: https://github.com/apache/hbase/pull/7192#discussion_r2274073504
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestBytesReadFromFs.java:
##########
@@ -268,6 +268,10 @@ private void readLoadOnOpenDataSection(Path path, boolean
hasBloomFilters) throw
CacheConfig cacheConfig = new CacheConfig(conf);
HFile.Reader reader = new HFilePreadReader(readerContext, hfile,
cacheConfig, conf);
+ // Since HBASE-28466, we call fileInfo.initMetaAndIndex inside
HFilePreadReader,
+ // which reads some blocks and increment the counters, so we need to reset
it here.
+ ThreadLocalServerSideScanMetrics.getBytesReadFromFsAndReset();
+ ThreadLocalServerSideScanMetrics.getBlockReadOpsCountAndReset();
Review Comment:
it's not part of #7124 , can you point out where does this come from ? new
changes to fix tests when HBASE-28466 is included?
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java:
##########
@@ -1378,7 +1379,8 @@ public HFileBlock readBlock(long dataBlockOffset, long
onDiskBlockSize, final bo
}
BlockType.BlockCategory category =
hfileBlock.getBlockType().getCategory();
final boolean cacheCompressed =
cacheConf.shouldCacheCompressed(category);
- final boolean cacheOnRead = cacheConf.shouldCacheBlockOnRead(category);
+ final boolean cacheOnRead =
Review Comment:
this part is different from #5905 , where `cacheOnRead` has been defined but
it does not use in line#1391 and line#1405, is it expected?
in other words, is these two APIs of
`cacheConf.shouldCacheBlockOnRead(category)` and
`cacheConf.shouldCacheBlockOnRead(category, getHFileInfo(), conf)` the same?
--
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]