HBase
  1. HBase
  2. HBASE-5586

[replication] NPE in ReplicationSource when creating a stream to an inexistent cluster

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.90.5
    • Fix Version/s: 0.94.0, 0.95.0
    • Component/s: Replication
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      This is from 0.92.1-ish:

      2012-03-15 09:52:16,589 ERROR
      org.apache.hadoop.hbase.replication.regionserver.ReplicationSource:
      Unexpected exception in ReplicationSource, currentPath=null
      java.lang.NullPointerException
             at org.apache.hadoop.hbase.replication.regionserver.ReplicationSource.chooseSinks(ReplicationSource.java:223)
             at org.apache.hadoop.hbase.replication.regionserver.ReplicationSource.connectToPeers(ReplicationSource.java:442)
             at org.apache.hadoop.hbase.replication.regionserver.ReplicationSource.run(ReplicationSource.java:246)
      

      I wanted to add a replication stream to a cluster that wasn't existing yet so that the logs would be buffered until then. This should just be treated as if there was no region servers.

      1. HBASE-5586.java
        3 kB
        Jean-Daniel Cryans
      2. HBASE-5586.java
        3 kB
        Jean-Daniel Cryans
      3. 5586-v2.txt
        4 kB
        Lars Hofhansl
      4. HBASE-5586-trunk.patch
        5 kB
        Jean-Daniel Cryans

        Activity

        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK #2693 (See https://builds.apache.org/job/HBase-TRUNK/2693/)
        HBASE-5586 [replication] NPE in ReplicationSource when creating a stream
        to an inexistent cluster (Revision 1303945)

        Result = SUCCESS
        jdcryans :
        Files :

        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java
        • /hbase/trunk/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationZookeeper.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK #2693 (See https://builds.apache.org/job/HBase-TRUNK/2693/ ) HBASE-5586 [replication] NPE in ReplicationSource when creating a stream to an inexistent cluster (Revision 1303945) Result = SUCCESS jdcryans : Files : /hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java /hbase/trunk/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationZookeeper.java
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK-security #146 (See https://builds.apache.org/job/HBase-TRUNK-security/146/)
        HBASE-5586 [replication] NPE in ReplicationSource when creating a stream
        to an inexistent cluster (Revision 1303945)

        Result = SUCCESS
        jdcryans :
        Files :

        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java
        • /hbase/trunk/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationZookeeper.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK-security #146 (See https://builds.apache.org/job/HBase-TRUNK-security/146/ ) HBASE-5586 [replication] NPE in ReplicationSource when creating a stream to an inexistent cluster (Revision 1303945) Result = SUCCESS jdcryans : Files : /hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java /hbase/trunk/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationZookeeper.java
        Hide
        Hudson added a comment -

        Integrated in HBase-0.92 #335 (See https://builds.apache.org/job/HBase-0.92/335/)
        HBASE-5586 [replication] NPE in ReplicationSource when creating a stream
        to an inexistent cluster (Revision 1303943)

        Result = SUCCESS
        jdcryans :
        Files :

        • /hbase/branches/0.92/CHANGES.txt
        • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java
        • /hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationZookeeper.java
        Show
        Hudson added a comment - Integrated in HBase-0.92 #335 (See https://builds.apache.org/job/HBase-0.92/335/ ) HBASE-5586 [replication] NPE in ReplicationSource when creating a stream to an inexistent cluster (Revision 1303943) Result = SUCCESS jdcryans : Files : /hbase/branches/0.92/CHANGES.txt /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java /hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationZookeeper.java
        Hide
        Hudson added a comment -

        Integrated in HBase-0.94 #46 (See https://builds.apache.org/job/HBase-0.94/46/)
        HBASE-5586 [replication] NPE in ReplicationSource when creating a stream
        to an inexistent cluster (Revision 1303944)

        Result = SUCCESS
        jdcryans :
        Files :

        • /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java
        • /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationZookeeper.java
        Show
        Hudson added a comment - Integrated in HBase-0.94 #46 (See https://builds.apache.org/job/HBase-0.94/46/ ) HBASE-5586 [replication] NPE in ReplicationSource when creating a stream to an inexistent cluster (Revision 1303944) Result = SUCCESS jdcryans : Files : /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationZookeeper.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/12519471/HBASE-5586-trunk.patch
        against trunk revision .

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

        +1 tests included. The patch appears to include 3 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

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

        -1 findbugs. The patch appears to introduce 2 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 passed unit tests in .

        Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/1259//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1259//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1259//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/12519471/HBASE-5586-trunk.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 2 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 passed unit tests in . Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/1259//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1259//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1259//console This message is automatically generated.
        Hide
        Jean-Daniel Cryans added a comment -

        Committed to 0.92, 0.94, and 0.96. I skipped 0.90, should be easy enough to backport should anyone really need it (my guess is it won't be).

        Thanks for the review Lars.

        Show
        Jean-Daniel Cryans added a comment - Committed to 0.92, 0.94, and 0.96. I skipped 0.90, should be easy enough to backport should anyone really need it (my guess is it won't be). Thanks for the review Lars.
        Hide
        Lars Hofhansl added a comment -

        Yeah, I spent the whole night on various iterations of this patch

        +1

        Show
        Lars Hofhansl added a comment - Yeah, I spent the whole night on various iterations of this patch +1
        Hide
        Jean-Daniel Cryans added a comment -

        Thanks for the heavy lifting Lars.

        Here's a patch for trunk, I set the test to Medium since it uses a ZK cluster, added a teardown, and a missing license.

        Show
        Jean-Daniel Cryans added a comment - Thanks for the heavy lifting Lars. Here's a patch for trunk, I set the test to Medium since it uses a ZK cluster, added a teardown, and a missing license.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12519453/5586-v2.txt
        against trunk revision .

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

        +1 tests included. The patch appears to include 3 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

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

        -1 findbugs. The patch appears to introduce 2 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.regionserver.TestSplitTransactionOnCluster
        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/1257//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1257//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1257//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/12519453/5586-v2.txt against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 2 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.regionserver.TestSplitTransactionOnCluster 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/1257//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1257//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1257//console This message is automatically generated.
        Hide
        Lars Hofhansl added a comment -

        Patch that does this

        Show
        Lars Hofhansl added a comment - Patch that does this
        Hide
        Jean-Daniel Cryans added a comment -

        return Collections.emptyList() instead?

        But then it won't be a one liner as I'll have to refactor the other lines like that!

        It would probably be better to use that yeah, and more readable.

        Show
        Jean-Daniel Cryans added a comment - return Collections.emptyList() instead? But then it won't be a one liner as I'll have to refactor the other lines like that! It would probably be better to use that yeah, and more readable.
        Hide
        Lars Hofhansl added a comment -
        -      return null;
        +      return new ArrayList<ServerName>(0);
        

        return Collections.emptyList() instead?

        Show
        Lars Hofhansl added a comment - - return null ; + return new ArrayList<ServerName>(0); return Collections.emptyList() instead?
        Hide
        Jean-Daniel Cryans added a comment -

        One line fix plus a whole new test. I'd like to add more testing in there eventually for other stuff. This is against 0.92, I'll have to port it to 0.94 and beyond.

        Show
        Jean-Daniel Cryans added a comment - One line fix plus a whole new test. I'd like to add more testing in there eventually for other stuff. This is against 0.92, I'll have to port it to 0.94 and beyond.
        Hide
        Jean-Daniel Cryans added a comment -

        One line fix plus a whole new test. I'd like to add more testing in there eventually for other stuff. This is against 0.92, I'll have to port it to 0.94 and beyond.

        Show
        Jean-Daniel Cryans added a comment - One line fix plus a whole new test. I'd like to add more testing in there eventually for other stuff. This is against 0.92, I'll have to port it to 0.94 and beyond.
        Hide
        Jean-Daniel Cryans added a comment -

        Yep I have a tested patch but no unit tests. I'm trying to get HBASE-3134 tested here first.

        Show
        Jean-Daniel Cryans added a comment - Yep I have a tested patch but no unit tests. I'm trying to get HBASE-3134 tested here first.
        Hide
        Lars Hofhansl added a comment -

        @J-D: Are you planning a fix for 0.94?

        Show
        Lars Hofhansl added a comment - @J-D: Are you planning a fix for 0.94?

          People

          • Assignee:
            Jean-Daniel Cryans
            Reporter:
            Jean-Daniel Cryans
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development