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

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development