Skip to content

Commit e259137

Browse files
committed
HBASE-28467: Fixed unit test.
Change-Id: I924b06e94c83502b39418097813da06d000dc336
1 parent 168383f commit e259137

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,10 @@ public boolean shouldCacheBlockOnRead(BlockCategory category, HFileInfo hFileInf
279279
Configuration conf) {
280280
Optional<Boolean> cacheFileBlock = Optional.of(true);
281281
if (getBlockCache().isPresent()) {
282-
cacheFileBlock = getBlockCache().get().shouldCacheFile(hFileInfo, conf);
282+
Optional<Boolean> result = getBlockCache().get().shouldCacheFile(hFileInfo, conf);
283+
if (result.isPresent()) {
284+
cacheFileBlock = result;
285+
}
283286
}
284287
return shouldCacheBlockOnRead(category) && cacheFileBlock.get();
285288
}

0 commit comments

Comments
 (0)