HBase
  1. HBase
  2. HBASE-7911

Remove duplicated code from CreateTableHandler

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.95.2
    • Fix Version/s: 0.95.0
    • Component/s: master
    • Labels:
      None

      Description

      The snapshot merge have left some unused/duplicated code in CreateTableHandler/ModifyRegionUtils

      1. HBASE-7911-v0.patch
        5 kB
        Matteo Bertozzi
      2. HBASE-7911-v0.patch
        5 kB
        Matteo Bertozzi

        Issue Links

          Activity

          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12570548/HBASE-7911-v0.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 hadoop2.0. The patch compiles against the hadoop 2.0 profile.

          +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 does not introduce any new Findbugs (version 1.3.9) warnings.

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

          +1 lineLengths. The patch does not introduce lines longer than 100

          -1 core tests. The patch failed these unit tests:
          org.apache.hadoop.hbase.backup.TestHFileArchiving

          -1 core zombie tests. There are 1 zombie test(s):

          Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/4501//testReport/
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4501//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4501//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4501//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4501//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4501//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4501//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4501//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
          Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/4501//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/12570548/HBASE-7911-v0.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 hadoop2.0 . The patch compiles against the hadoop 2.0 profile. +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 does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 lineLengths . The patch does not introduce lines longer than 100 -1 core tests . The patch failed these unit tests: org.apache.hadoop.hbase.backup.TestHFileArchiving -1 core zombie tests . There are 1 zombie test(s): Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/4501//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4501//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4501//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4501//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4501//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4501//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4501//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4501//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/4501//console This message is automatically generated.
          Hide
          stack added a comment -

          +1 unless the above test failures are because of this patch.

          Show
          stack added a comment - +1 unless the above test failures are because of this patch.
          Hide
          Matteo Bertozzi added a comment -

          On local the test it passes, still finishing running on my jenkins.
          But it will be nice to see the trace of the error above since may cause snapshot data loss.

          Running org.apache.hadoop.hbase.backup.TestHFileArchiving
          Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 185.986 sec
          
          Show
          Matteo Bertozzi added a comment - On local the test it passes, still finishing running on my jenkins. But it will be nice to see the trace of the error above since may cause snapshot data loss. Running org.apache.hadoop.hbase.backup.TestHFileArchiving Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 185.986 sec
          Show
          stack added a comment - Is this it Matteo Bertozzi ? https://builds.apache.org/job/PreCommit-HBASE-Build/4501//artifact/trunk/hbase-server/target/surefire-reports/org.apache.hadoop.hbase.backup.TestHFileArchiving-output.txt
          Hide
          Matteo Bertozzi added a comment -

          The error seems to be related to the ZK Table Lock
          https://builds.apache.org/job/PreCommit-HBASE-Build/4501//artifact/trunk/hbase-server/target/surefire-reports/org.apache.hadoop.hbase.backup.TestHFileArchiving.txt

          Caused by: org.apache.hadoop.ipc.RemoteException: java.io.IOException: java.lang.NullPointerException
          	at java.util.TreeSet.addAll(TreeSet.java:283)
          	at org.apache.hadoop.hbase.zookeeper.lock.ZKInterProcessWriteLock.getLockPath(ZKInterProcessWriteLock.java:54)
          	at org.apache.hadoop.hbase.zookeeper.lock.ZKInterProcessLockBase.tryAcquire(ZKInterProcessLockBase.java:180)
          	at org.apache.hadoop.hbase.master.TableLockManager$ZKTableLockManager$TableLockImpl.acquire(TableLockManager.java:235)
          	at org.apache.hadoop.hbase.master.handler.CreateTableHandler.prepare(CreateTableHandler.java:110)
          	at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:1520)
          	at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:1550)
          ...
          	at org.apache.hadoop.hbase.client.HBaseAdmin.execute(HBaseAdmin.java:2543)
          	at org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:515)
          	at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:408)
          	at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:344)
          	at org.apache.hadoop.hbase.HBaseTestingUtility.createTable(HBaseTestingUtility.java:1014)
          	at org.apache.hadoop.hbase.HBaseTestingUtility.createTable(HBaseTestingUtility.java:982)
          	at org.apache.hadoop.hbase.HBaseTestingUtility.createTable(HBaseTestingUtility.java:970)
          	at org.apache.hadoop.hbase.backup.TestHFileArchiving.setup(TestHFileArchiving.java:96)
          
          Show
          Matteo Bertozzi added a comment - The error seems to be related to the ZK Table Lock https://builds.apache.org/job/PreCommit-HBASE-Build/4501//artifact/trunk/hbase-server/target/surefire-reports/org.apache.hadoop.hbase.backup.TestHFileArchiving.txt Caused by: org.apache.hadoop.ipc.RemoteException: java.io.IOException: java.lang.NullPointerException at java.util.TreeSet.addAll(TreeSet.java:283) at org.apache.hadoop.hbase.zookeeper.lock.ZKInterProcessWriteLock.getLockPath(ZKInterProcessWriteLock.java:54) at org.apache.hadoop.hbase.zookeeper.lock.ZKInterProcessLockBase.tryAcquire(ZKInterProcessLockBase.java:180) at org.apache.hadoop.hbase.master.TableLockManager$ZKTableLockManager$TableLockImpl.acquire(TableLockManager.java:235) at org.apache.hadoop.hbase.master.handler.CreateTableHandler.prepare(CreateTableHandler.java:110) at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:1520) at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:1550) ... at org.apache.hadoop.hbase.client.HBaseAdmin.execute(HBaseAdmin.java:2543) at org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:515) at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:408) at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:344) at org.apache.hadoop.hbase.HBaseTestingUtility.createTable(HBaseTestingUtility.java:1014) at org.apache.hadoop.hbase.HBaseTestingUtility.createTable(HBaseTestingUtility.java:982) at org.apache.hadoop.hbase.HBaseTestingUtility.createTable(HBaseTestingUtility.java:970) at org.apache.hadoop.hbase.backup.TestHFileArchiving.setup(TestHFileArchiving.java:96)
          Hide
          stack added a comment -

          Enis Soztutar you see above?

          Matteo Bertozzi open issue on above and commit your patch? Good on you.

          Show
          stack added a comment - Enis Soztutar you see above? Matteo Bertozzi open issue on above and commit your patch? Good on you.
          Hide
          Enis Soztutar added a comment -

          Hmmm, interesting that this test did not fail for the hadoopqa in HBASE-7305. Let me check it out.

          Show
          Enis Soztutar added a comment - Hmmm, interesting that this test did not fail for the hadoopqa in HBASE-7305 . Let me check it out.
          Hide
          Enis Soztutar added a comment -

          I cannot repo the exception locally. You can go ahead with the commit.

          Show
          Enis Soztutar added a comment - I cannot repo the exception locally. You can go ahead with the commit.
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12570567/HBASE-7911-v0.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 hadoop2.0. The patch compiles against the hadoop 2.0 profile.

          +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 does not introduce any new Findbugs (version 1.3.9) warnings.

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

          +1 lineLengths. The patch does not introduce lines longer than 100

          +1 core tests. The patch passed unit tests in .

          Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/4506//testReport/
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4506//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4506//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4506//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4506//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4506//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4506//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4506//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
          Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/4506//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/12570567/HBASE-7911-v0.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 hadoop2.0 . The patch compiles against the hadoop 2.0 profile. +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 does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 lineLengths . The patch does not introduce lines longer than 100 +1 core tests . The patch passed unit tests in . Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/4506//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4506//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4506//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4506//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4506//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4506//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4506//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4506//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/4506//console This message is automatically generated.
          Hide
          Matteo Bertozzi added a comment -

          Enis Soztutar Maybe some race in the tests? The only way I can see a NullPointerException looking at the code is that the parent node doesn't exists and listChildren() returns null
          https://github.com/apache/hbase/blob/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java#L570

          Show
          Matteo Bertozzi added a comment - Enis Soztutar Maybe some race in the tests? The only way I can see a NullPointerException looking at the code is that the parent node doesn't exists and listChildren() returns null https://github.com/apache/hbase/blob/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java#L570
          Hide
          Matteo Bertozzi added a comment -

          committed to trunk, thanks for the review guys.
          (I guess that the ZKLock investigation is moving to another jira)

          Show
          Matteo Bertozzi added a comment - committed to trunk, thanks for the review guys. (I guess that the ZKLock investigation is moving to another jira)
          Hide
          stack added a comment -

          I guess that the ZKLock investigation is moving to another jira

          I'll start working on fixing unit tests soon Matteo... will look at it in that context when it happens again.

          Show
          stack added a comment - I guess that the ZKLock investigation is moving to another jira I'll start working on fixing unit tests soon Matteo... will look at it in that context when it happens again.
          Hide
          Hudson added a comment -

          Integrated in HBase-TRUNK #3894 (See https://builds.apache.org/job/HBase-TRUNK/3894/)
          HBASE-7911 Remove duplicated code from CreateTableHandler (Revision 1449400)

          Result = FAILURE
          mbertozzi :
          Files :

          • /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/CreateTableHandler.java
          • /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ModifyRegionUtils.java
          Show
          Hudson added a comment - Integrated in HBase-TRUNK #3894 (See https://builds.apache.org/job/HBase-TRUNK/3894/ ) HBASE-7911 Remove duplicated code from CreateTableHandler (Revision 1449400) Result = FAILURE mbertozzi : Files : /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/CreateTableHandler.java /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ModifyRegionUtils.java
          Hide
          Hudson added a comment -

          Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #418 (See https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/418/)
          HBASE-7911 Remove duplicated code from CreateTableHandler (Revision 1449400)

          Result = FAILURE
          mbertozzi :
          Files :

          • /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/CreateTableHandler.java
          • /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ModifyRegionUtils.java
          Show
          Hudson added a comment - Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #418 (See https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/418/ ) HBASE-7911 Remove duplicated code from CreateTableHandler (Revision 1449400) Result = FAILURE mbertozzi : Files : /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/CreateTableHandler.java /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ModifyRegionUtils.java
          Hide
          Enis Soztutar added a comment -

          The only way I can see a NullPointerException looking at the code is that the parent node doesn't exists and listChildren() returns null

          Yes, it seems that we are getting the NPE because znode children returns null. We do create the parent node in ctor of ZKInterProcessLockBase, so it should be some race condition.

          Show
          Enis Soztutar added a comment - The only way I can see a NullPointerException looking at the code is that the parent node doesn't exists and listChildren() returns null Yes, it seems that we are getting the NPE because znode children returns null. We do create the parent node in ctor of ZKInterProcessLockBase, so it should be some race condition.
          Hide
          stack added a comment -

          Marking closed.

          Show
          stack added a comment - Marking closed.

            People

            • Assignee:
              Matteo Bertozzi
              Reporter:
              Matteo Bertozzi
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development