[
https://issues.apache.org/jira/browse/HBASE-11770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14101384#comment-14101384
]
Sergey Soldatov commented on HBASE-11770:
-----------------------------------------
[~stack] I have checked the reason why it fails. The addDataAndHits method is
getting data by getBlock. It's fine if block is still in RamCache and not added
to backingMap. In other hands if WriterThread adds the block to backingMap and
remove it from RamCache, on get operation it will try to get it from backingMap
using deserializer. This test is using DataCacheEntry which has Deserializer,
but doesn't init it in CacheableDeserializerIdManager, so on the attempt to
receive the corresponding Deserializer we receive null and get NPE when use it.
My fix register Deserializer in CacheableDeserializerIdManager. Feel free to
fix it in another way if this way is not desirable.
> TestBlockCacheReporting.testBucketCache is not stable
> ------------------------------------------------------
>
> Key: HBASE-11770
> URL: https://issues.apache.org/jira/browse/HBASE-11770
> Project: HBase
> Issue Type: Bug
> Components: test
> Environment: kvm box with Ubuntu 12.04 Desktop 64bit.
> java version "1.7.0_65"
> Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
> Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
> Reporter: Sergey Soldatov
> Assignee: Sergey Soldatov
> Attachments: HBASE-11770-v1.patch
>
>
> Depending on the machine and OS TestBlockCacheReporting.testBucketCache may
> fail with NPE:
> java.lang.NullPointerException
> at
> org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.getBlock(BucketCache.java:417)
> at
> org.apache.hadoop.hbase.io.hfile.CombinedBlockCache.getBlock(CombinedBlockCache.java:80)
> at
> org.apache.hadoop.hbase.io.hfile.TestBlockCacheReporting.addDataAndHits(TestBlockCacheReporting.java:67)
> at
> org.apache.hadoop.hbase.io.hfile.TestBlockCacheReporting.testBucketCache(TestBlockCacheReporting.java:86)
--
This message was sent by Atlassian JIRA
(v6.2#6252)