HBase
  1. HBase
  2. HBASE-9421

Provide better error message when dropping non-existent namespace

    Details

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

      Description

      If a non-existent namespace is dropped, FileNotFoundException is thrown.
      There should be better error message like "namespace does not exist"

      hbase(main):002:0> drop_namespace 'hi'
      
      ERROR: java.io.FileNotFoundException: File hdfs://h.com:8020/apps/hbase/data/data/hi does not exist.
      	at org.apache.hadoop.hdfs.DistributedFileSystem.listStatusInternal(DistributedFileSystem.java:656)
      	at org.apache.hadoop.hdfs.DistributedFileSystem.access$600(DistributedFileSystem.java:92)
      	at org.apache.hadoop.hdfs.DistributedFileSystem$14.doCall(DistributedFileSystem.java:714)
      	at org.apache.hadoop.hdfs.DistributedFileSystem$14.doCall(DistributedFileSystem.java:710)
      	at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:78)
      	at org.apache.hadoop.hdfs.DistributedFileSystem.listStatus(DistributedFileSystem.java:710)
      	at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1478)
      	at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1518)
      	at org.apache.hadoop.hbase.util.FSUtils.getLocalTableDirs(FSUtils.java:1316)
      	at org.apache.hadoop.hbase.util.FSTableDescriptors.getByNamespace(FSTableDescriptors.java:222)
      	at org.apache.hadoop.hbase.master.HMaster.listTableDescriptorsByNamespace(HMaster.java:3121)
      	at org.apache.hadoop.hbase.master.TableNamespaceManager.remove(TableNamespaceManager.java:158)
      	at org.apache.hadoop.hbase.master.HMaster.deleteNamespace(HMaster.java:3106)
      	at org.apache.hadoop.hbase.master.HMaster.deleteNamespace(HMaster.java:3000)
      	at org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos$MasterAdminService$2.callBlockingMethod(MasterAdminProtos.java:32902)
      	at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2147)
      	at org.apache.hadoop.hbase.ipc.RpcServer$Handler.run(RpcServer.java:1854)
      
      Here is some help for this command:
      Drop the named namespace. The namespace must be empty.
      

        Activity

        Hide
        Ted Yu added a comment -

        Patch v1 checks whether namespace exists.

        If not, throw ConstraintException with proper message.

        Show
        Ted Yu added a comment - Patch v1 checks whether namespace exists. If not, throw ConstraintException with proper message.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12601234/9421-v1.txt
        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 hadoop1.0. The patch compiles against the hadoop 1.0 profile.

        +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 site. The mvn site goal succeeds with this patch.

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

        Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/7016//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7016//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7016//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7016//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7016//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7016//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7016//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7016//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7016//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/7016//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/12601234/9421-v1.txt 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 hadoop1.0 . The patch compiles against the hadoop 1.0 profile. +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 site . The mvn site goal succeeds with this patch. +1 core tests . The patch passed unit tests in . Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/7016//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7016//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7016//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7016//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7016//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7016//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7016//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7016//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7016//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/7016//console This message is automatically generated.
        Hide
        Anoop Sam John added a comment -

        +1

        Show
        Anoop Sam John added a comment - +1
        Hide
        Ted Yu added a comment -

        Integrated to trunk.

        Thanks for the review, Anoop.

        Show
        Ted Yu added a comment - Integrated to trunk. Thanks for the review, Anoop.
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in HBase-TRUNK #4463 (See https://builds.apache.org/job/HBase-TRUNK/4463/)
        HBASE-9421 Provide better error message when dropping non-existent namespace (Ted Yu) (tedyu: rev 1520043)

        • /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java
        Show
        Hudson added a comment - SUCCESS: Integrated in HBase-TRUNK #4463 (See https://builds.apache.org/job/HBase-TRUNK/4463/ ) HBASE-9421 Provide better error message when dropping non-existent namespace (Ted Yu) (tedyu: rev 1520043) /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java
        Hide
        Ted Yu added a comment -

        Integrated to 0.96

        Show
        Ted Yu added a comment - Integrated to 0.96
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in hbase-0.96 #10 (See https://builds.apache.org/job/hbase-0.96/10/)
        HBASE-9421 Provide better error message when dropping non-existent namespace (tedyu: rev 1520136)

        • /hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java
        Show
        Hudson added a comment - SUCCESS: Integrated in hbase-0.96 #10 (See https://builds.apache.org/job/hbase-0.96/10/ ) HBASE-9421 Provide better error message when dropping non-existent namespace (tedyu: rev 1520136) /hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java
        Hide
        Hudson added a comment -

        FAILURE: Integrated in hbase-0.96-hadoop2 #5 (See https://builds.apache.org/job/hbase-0.96-hadoop2/5/)
        HBASE-9421 Provide better error message when dropping non-existent namespace (tedyu: rev 1520136)

        • /hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java
        Show
        Hudson added a comment - FAILURE: Integrated in hbase-0.96-hadoop2 #5 (See https://builds.apache.org/job/hbase-0.96-hadoop2/5/ ) HBASE-9421 Provide better error message when dropping non-existent namespace (tedyu: rev 1520136) /hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java
        Hide
        Hudson added a comment -

        FAILURE: Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #710 (See https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/710/)
        HBASE-9421 Provide better error message when dropping non-existent namespace (Ted Yu) (tedyu: rev 1520043)

        • /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java
        Show
        Hudson added a comment - FAILURE: Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #710 (See https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/710/ ) HBASE-9421 Provide better error message when dropping non-existent namespace (Ted Yu) (tedyu: rev 1520043) /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java

          People

          • Assignee:
            Ted Yu
            Reporter:
            Ted Yu
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development