Details
-
Sub-task
-
Status: Open
-
Critical
-
Resolution: Unresolved
-
None
-
None
-
None
Description
What happened
After setting hfile.block.cache.size=1.1175870895385742E-8, running test org.apache.hadoop.hbase.io.hfile.TestBlockCacheReporting#testLruBlockCache results in a NullPointerException.
Where's the bug
In the test org.apache.hadoop.hbase.io.hfile.TestBlockCacheReporting#testLruBlockCache:
BlockCache blockCache = BlockCacheFactory.createBlockCache(this.conf);
logPerBlock(blockCache);
addDataAndHits(blockCache, 3);
Here the returned blockCache could be null, but is directly used as the parameter of logPerBlock without checking.
How to reproduce
- Set hfile.block.cache.size=1.1175870895385742E-8
- Run org.apache.hadoop.hbase.io.hfile.TestBlockCacheReporting#testLruBlockCache
and the following exception should be observed:
java.lang.NullPointerException at org.apache.hadoop.hbase.io.hfile.TestBlockCacheReporting.logPerBlock(TestBlockCacheReporting.java:147) at org.apache.hadoop.hbase.io.hfile.TestBlockCacheReporting.testLruBlockCache(TestBlockCacheReporting.java:100)
{{}}
Attachments
Attachments
Issue Links
- links to