XMLWordPrintableJSON

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

      1. Set hfile.block.cache.size=1.1175870895385742E-8
      2. 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

        1. reproduce.sh
          0.7 kB
          ConfX

        Issue Links

          Activity

            People

              Unassigned Unassigned
              FuzzingTeam ConfX
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: