jhungund commented on code in PR #5905:
URL: https://github.com/apache/hbase/pull/5905#discussion_r1607734006
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java:
##########
@@ -1357,9 +1357,10 @@ 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 shouldCacheFileBlock =
cacheConf.shouldCacheFileBlock(getHFileInfo(), conf);
// Don't need the unpacked block back and we're storing the block in
the cache compressed
- if (cacheOnly && cacheCompressed && cacheOnRead) {
+ if (cacheOnly && cacheCompressed && cacheOnRead &&
shouldCacheFileBlock) {
Review Comment:
ack. I have added an overloaded function to be used in this case and kept
the original function to be used at other places. Please take a look.
Thanks,
Janardhan
--
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]