wchevreuil commented on code in PR #5905:
URL: https://github.com/apache/hbase/pull/5905#discussion_r1601975139
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java:
##########
@@ -1357,9 +1357,16 @@ 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);
+ Optional<Boolean> cacheFileBlock = Optional.of(true);
+ // Additionally perform the time-based priority checks to see
+ // whether, or not to cache the block.
+ if (cacheConf.getBlockCache().isPresent()) {
+ cacheFileBlock =
cacheConf.getBlockCache().get().shouldCacheFile(getHFileInfo(), conf);
+ }
+ final boolean shouldCacheFileBlock = cacheFileBlock.get();
Review Comment:
Can we move this inside cacheConf.shouldCacheBlockOnRead?
--
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]