HBASE-22441 BucketCache NullPointerException in cacheBlock
This commit is contained in:
parent
378e8ba58f
commit
8e9b504ffe
|
@ -227,6 +227,10 @@ public class BlockCacheUtil {
|
|||
public static boolean shouldReplaceExistingCacheBlock(BlockCache blockCache,
|
||||
BlockCacheKey cacheKey, Cacheable newBlock) {
|
||||
Cacheable existingBlock = blockCache.getBlock(cacheKey, false, false, false);
|
||||
if (null == existingBlock) {
|
||||
// Not exist now.
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
int comparison = BlockCacheUtil.validateBlockAddition(existingBlock, newBlock, cacheKey);
|
||||
if (comparison < 0) {
|
||||
|
|
Loading…
Reference in New Issue