Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-9421

Provide better error message when dropping non-existent namespace

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.98.0, 0.96.0
    • None
    • None
    • 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.
      

      Attachments

        1. 9421-v1.txt
          2 kB
          Ted Yu

        Activity

          People

            yuzhihong@gmail.com Ted Yu
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: