HBase
  1. HBase
  2. HBASE-9519

fix NPE in EncodedScannerV2.getFirstKeyInBlock()

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.98.0, 0.96.1
    • Fix Version/s: 0.98.0
    • Component/s: HFile
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      we observed a reproducable NPE while scanning special table under special condition in our IntegratedTesting scenario, it was fixed by appling the attached patch.

      org.apache.hadoop.hbase.client.ScannerCallable@67ee75a5, java.io.IOException: java.io.IOException: java.lang.NullPointerException
      at org.apache.hadoop.hbase.regionserver.HRegionServer.convertThrowableToIOE(HRegionServer.java:1186)
      at org.apache.hadoop.hbase.regionserver.HRegionServer.convertThrowableToIOE(HRegionServer.java:1175)
      at org.apache.hadoop.hbase.regionserver.HRegionServer.openScanner(HRegionServer.java:2391)
      at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.hadoop.hbase.ipc.SecureRpcEngine$Server.call(SecureRpcEngine.java:456)
      at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1426)
      Caused by: java.lang.NullPointerException
      at org.apache.hadoop.hbase.io.hfile.HFileReaderV2$EncodedScannerV2.getFirstKeyInBlock(HFileReaderV2.java:1071)
      at org.apache.hadoop.hbase.io.hfile.HFileReaderV2$AbstractScannerV2.seekBefore(HFileReaderV2.java:547)
      at org.apache.hadoop.hbase.io.HalfStoreFileReader$1.seekBefore(HalfStoreFileReader.java:159)
      at org.apache.hadoop.hbase.io.HalfStoreFileReader$1.seekBefore(HalfStoreFileReader.java:142)
      at org.apache.hadoop.hbase.io.HalfStoreFileReader.getLastKey(HalfStoreFileReader.java:267)
      at org.apache.hadoop.hbase.regionserver.StoreFile$Reader.passesKeyRangeFilter(StoreFile.java:1543)
      at org.apache.hadoop.hbase.regionserver.StoreFileScanner.shouldUseScanner(StoreFileScanner.java:375)
      at org.apache.hadoop.hbase.regionserver.StoreScanner.selectScannersFrom(StoreScanner.java:298)
      at org.apache.hadoop.hbase.regionserver.StoreScanner.getScannersNoCompaction(StoreScanner.java:262)
      at org.apache.hadoop.hbase.regionserver.StoreScanner.<init>(StoreScanner.java:149)
      at org.apache.hadoop.hbase.regionserver.Store.getScanner(Store.java:2122)
      at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.<init>(HRegion.java:3460)
      at org.apache.hadoop.hbase.regionserver.HRegion.instantiateRegionScanner(HRegion.java:1645)
      at org.apache.hadoop.hbase.regionserver.HRegion.getScanner(HRegion.java:1635)
      at org.apache.hadoop.hbase.regionserver.HRegion.getScanner(HRegion.java:1610)
      at org.apache.hadoop.hbase.regionserver.HRegionServer.openScanner(HRegionServer.java:2377)
      ... 5 more

      1. HBASE-9519-v2.txt
        2 kB
        Liang Xie
      2. HBASE-9519.txt
        0.9 kB
        Liang Xie

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Liang Xie
            Reporter:
            Liang Xie
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development