HBase
  1. HBase
  2. HBASE-5424

HTable meet NPE when call getRegionInfo()

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 0.90.1, 0.90.5
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Tags:
      NPE

      Description

      We meet NPE when call getRegionInfo() in testing environment.
      Exception in thread "main" java.lang.NullPointerException
      at org.apache.hadoop.hbase.util.Writables.getWritable(Writables.java:75)
      at org.apache.hadoop.hbase.util.Writables.getHRegionInfo(Writables.java:119)
      at org.apache.hadoop.hbase.client.HTable$2.processRow(HTable.java:395)
      at org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:190)
      at org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:95)
      at org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:73)
      at org.apache.hadoop.hbase.client.HTable.getRegionsInfo(HTable.java:418)

      This NPE also make the table.jsp can't show the region information of this table.

      1. HBASE-5424.patch
        2 kB
        junhua yang
      2. HBase-5424_v2.patch
        0.9 kB
        zhiyuan.dai
      3. 5424-v3.patch
        2 kB
        stack
      4. 5424-v3.patch
        2 kB
        stack

        Activity

        Hide
        junhua yang added a comment -

        We do a patch to fix this in 0.90.5.
        Could you help to review it ?
        thank you very much.

        Show
        junhua yang added a comment - We do a patch to fix this in 0.90.5. Could you help to review it ? thank you very much.
        Hide
        zhiyuan.dai added a comment -

        not only table.jsp,but method getRegionInfo won't be called ...

        Show
        zhiyuan.dai added a comment - not only table.jsp,but method getRegionInfo won't be called ...
        Hide
        stack added a comment -

        Submitting patch to hadoopqa. Odd that we've not seen this before but no harm in adding this fix which checks for null before using a deserialized HRegionInfo.

        Show
        stack added a comment - Submitting patch to hadoopqa. Odd that we've not seen this before but no harm in adding this fix which checks for null before using a deserialized HRegionInfo.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12514961/HBASE-5424.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/980//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12514961/HBASE-5424.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/980//console This message is automatically generated.
        Hide
        stack added a comment -

        Junhua Please make a patch w/o the D:/workspace/hbase-0.90.5 prefix? (Pass -p2 or something to patch?). Patches are applied inside HBASE_HOME by our build server. Thanks.

        Show
        stack added a comment - Junhua Please make a patch w/o the D:/workspace/hbase-0.90.5 prefix? (Pass -p2 or something to patch?). Patches are applied inside HBASE_HOME by our build server. Thanks.
        Hide
        stack added a comment -

        Oh, if you are making a new patch, you might consider making it so if info is null, just immediately return. Then you don't have to right-shift the whole body of the method (YOur patch will be smaller too). Thanks.

        Show
        stack added a comment - Oh, if you are making a new patch, you might consider making it so if info is null, just immediately return. Then you don't have to right-shift the whole body of the method (YOur patch will be smaller too). Thanks.
        Hide
        zhiyuan.dai added a comment -

        @stack @Hadoop QA
        i will improve, and do another patch which included test ut.

        Show
        zhiyuan.dai added a comment - @stack @Hadoop QA i will improve, and do another patch which included test ut.
        Hide
        Lars Hofhansl added a comment -

        @junhua: Under which circumstances do you see this NPE? Seems strange that we have not encountered that before. Are you sure this is not a case of different server and client versions?

        Show
        Lars Hofhansl added a comment - @junhua: Under which circumstances do you see this NPE? Seems strange that we have not encountered that before. Are you sure this is not a case of different server and client versions?
        Hide
        zhiyuan.dai added a comment -

        @Lars Hofhansl
        sure,meta may have some problem, we found the bug in 0.90.x(0.90.1 0.90.5)

        Show
        zhiyuan.dai added a comment - @Lars Hofhansl sure,meta may have some problem, we found the bug in 0.90.x(0.90.1 0.90.5)
        Hide
        Lars Hofhansl added a comment - - edited

        Thanks zhiyuan. I'm wondering whether we shouldn't focus on fixing the problem that caused the problem rather than pasting over it.

        Show
        Lars Hofhansl added a comment - - edited Thanks zhiyuan. I'm wondering whether we shouldn't focus on fixing the problem that caused the problem rather than pasting over it.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12515208/HBase-5424_1.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/991//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12515208/HBase-5424_1.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/991//console This message is automatically generated.
        Hide
        stack added a comment -

        @Zhiyuan Your patch failed to apply to trunk. See the console output:

        patching file src/main/java/org/apache/hadoop/hbase/client/HTable.java
        Hunk #1 FAILED at 423.
        patch unexpectedly ends in middle of line
        Hunk #2 succeeded at 428 with fuzz 2 (offset -14 lines).
        1 out of 2 hunks FAILED -- saving rejects to file src/main/java/org/apache/hadoop/hbase/client/HTable.java.rej
        PATCH APPLICATION FAILED
        

        Mind fixing? Your patch seems to have some odd formatting too. Thanks.

        Show
        stack added a comment - @Zhiyuan Your patch failed to apply to trunk. See the console output: patching file src/main/java/org/apache/hadoop/hbase/client/HTable.java Hunk #1 FAILED at 423. patch unexpectedly ends in middle of line Hunk #2 succeeded at 428 with fuzz 2 (offset -14 lines). 1 out of 2 hunks FAILED -- saving rejects to file src/main/java/org/apache/hadoop/hbase/client/HTable.java.rej PATCH APPLICATION FAILED Mind fixing? Your patch seems to have some odd formatting too. Thanks.
        Hide
        zhiyuan.dai added a comment -

        @stack
        i fix the bug based on 0.90.5.I will make anoher patch based on trunk.

        Show
        zhiyuan.dai added a comment - @stack i fix the bug based on 0.90.5.I will make anoher patch based on trunk.
        Hide
        zhiyuan.dai added a comment -

        @stack
        i have fix it based on trunk.
        Could you help to review it?
        thank you very much.

        Show
        zhiyuan.dai added a comment - @stack i have fix it based on trunk. Could you help to review it? thank you very much.
        Hide
        stack added a comment -

        I applied this patch to trunk (it fixes formatting issues in v2 otherwise same)

        Show
        stack added a comment - I applied this patch to trunk (it fixes formatting issues in v2 otherwise same)
        Hide
        stack added a comment -

        You need this on 0.90 branch too Zhiyuan? If so, add 0.90.7 as fix version.

        (We should also though do as Lars suggests; we're just band-aiding dealing w/ the NPE).

        Show
        stack added a comment - You need this on 0.90 branch too Zhiyuan? If so, add 0.90.7 as fix version. (We should also though do as Lars suggests; we're just band-aiding dealing w/ the NPE).
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12515696/5424-v3.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1017//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12515696/5424-v3.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1017//console This message is automatically generated.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12515692/HBase-5424_v2.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        -1 javadoc. The javadoc tool appears to have generated -136 warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        -1 findbugs. The patch appears to introduce 152 new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed these unit tests:
        org.apache.hadoop.hbase.replication.TestReplicationPeer
        org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat
        org.apache.hadoop.hbase.io.hfile.TestLruBlockCache
        org.apache.hadoop.hbase.mapred.TestTableMapReduce
        org.apache.hadoop.hbase.mapreduce.TestImportTsv

        Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/1015//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1015//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1015//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12515692/HBase-5424_v2.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 javadoc. The javadoc tool appears to have generated -136 warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 152 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests: org.apache.hadoop.hbase.replication.TestReplicationPeer org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat org.apache.hadoop.hbase.io.hfile.TestLruBlockCache org.apache.hadoop.hbase.mapred.TestTableMapReduce org.apache.hadoop.hbase.mapreduce.TestImportTsv Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/1015//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1015//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1015//console This message is automatically generated.
        Hide
        zhiyuan.dai added a comment -

        @stack
        ok,ok

        Show
        zhiyuan.dai added a comment - @stack ok,ok
        Hide
        stack added a comment -

        I reverted the patch. Too many new failures in hadoopqa. Let me retry it.

        Show
        stack added a comment - I reverted the patch. Too many new failures in hadoopqa. Let me retry it.
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK-security #120 (See https://builds.apache.org/job/HBase-TRUNK-security/120/)
        HBASE-5424 HTable meet NPE when call getRegionInfo() (Revision 1292645)

        Result = FAILURE
        stack :
        Files :

        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK-security #120 (See https://builds.apache.org/job/HBase-TRUNK-security/120/ ) HBASE-5424 HTable meet NPE when call getRegionInfo() (Revision 1292645) Result = FAILURE stack : Files : /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12515699/5424-v3.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        -1 javadoc. The javadoc tool appears to have generated -136 warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        -1 findbugs. The patch appears to introduce 152 new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed these unit tests:
        org.apache.hadoop.hbase.replication.TestReplicationPeer
        org.apache.hadoop.hbase.mapreduce.TestImportTsv
        org.apache.hadoop.hbase.mapred.TestTableMapReduce
        org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat

        Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/1018//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1018//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1018//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12515699/5424-v3.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 javadoc. The javadoc tool appears to have generated -136 warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 152 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests: org.apache.hadoop.hbase.replication.TestReplicationPeer org.apache.hadoop.hbase.mapreduce.TestImportTsv org.apache.hadoop.hbase.mapred.TestTableMapReduce org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/1018//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1018//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1018//console This message is automatically generated.
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK #2667 (See https://builds.apache.org/job/HBase-TRUNK/2667/)
        HBASE-5424 HTable meet NPE when call getRegionInfo() – REVERT (Revision 1292646)
        HBASE-5424 HTable meet NPE when call getRegionInfo() (Revision 1292645)

        Result = FAILURE
        stack :
        Files :

        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java

        stack :
        Files :

        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK #2667 (See https://builds.apache.org/job/HBase-TRUNK/2667/ ) HBASE-5424 HTable meet NPE when call getRegionInfo() – REVERT (Revision 1292646) HBASE-5424 HTable meet NPE when call getRegionInfo() (Revision 1292645) Result = FAILURE stack : Files : /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java stack : Files : /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK-security #121 (See https://builds.apache.org/job/HBase-TRUNK-security/121/)
        HBASE-5424 HTable meet NPE when call getRegionInfo() – REVERT (Revision 1292646)

        Result = SUCCESS
        stack :
        Files :

        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK-security #121 (See https://builds.apache.org/job/HBase-TRUNK-security/121/ ) HBASE-5424 HTable meet NPE when call getRegionInfo() – REVERT (Revision 1292646) Result = SUCCESS stack : Files : /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java
        Show
        zhiyuan.dai added a comment - see https://issues.apache.org/jira/browse/HBASE-5165
        Hide
        stack added a comment -

        Zhiyuan Why do you reference hbase-5165? You think it the cause of this patch's failures?

        Show
        stack added a comment - Zhiyuan Why do you reference hbase-5165? You think it the cause of this patch's failures?
        Hide
        zhiyuan.dai added a comment -

        @stack
        Yes stack,the cause of this patch's failures is hbase-5165.
        Chunhui.shen and me all come from Alibaba.

        Show
        zhiyuan.dai added a comment - @stack Yes stack,the cause of this patch's failures is hbase-5165. Chunhui.shen and me all come from Alibaba.
        Hide
        stack added a comment -

        Should we close this issue then Zhiyuan as fixed or will be fixed by 5165? Thanks.

        Show
        stack added a comment - Should we close this issue then Zhiyuan as fixed or will be fixed by 5165? Thanks.
        Hide
        zhiyuan.dai added a comment -

        @stack
        Yes stack.

        Show
        zhiyuan.dai added a comment - @stack Yes stack.
        Hide
        stack added a comment -

        Fixed by HBASE-5165

        Show
        stack added a comment - Fixed by HBASE-5165

          People

          • Assignee:
            Unassigned
            Reporter:
            junhua yang
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 48h
              48h
              Remaining:
              Remaining Estimate - 48h
              48h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development