Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-9920

DROP DATABASE IF EXISTS throws exception if database does not exist

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.2.0
    • Component/s: Logging, Metastore
    • Labels:
      None

      Description

      drop database if exists noexistingdb throws and logs full exception if the database (noexistingdb) does not exist:
      15/03/10 22:47:22 WARN metastore.ObjectStore: Failed to get database statsdb2, returning NoSuchObjectException
      15/03/11 00:19:55 ERROR metastore.RetryingHMSHandler: NoSuchObjectException(message:statsdb2)
      at org.apache.hadoop.hive.metastore.ObjectStore.getDatabase(ObjectStore.java:569)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.hadoop.hive.metastore.RawStoreProxy.invoke(RawStoreProxy.java:98)
      at com.sun.proxy.$Proxy6.getDatabase(Unknown Source)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_database_core(HiveMetaStore.java:953)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_database(HiveMetaStore.java:927)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107)
      at com.sun.proxy.$Proxy8.get_database(Unknown Source)
      at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getDatabase(HiveMetaStoreClient.java:1150)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:91)
      at com.sun.proxy.$Proxy9.getDatabase(Unknown Source)
      at org.apache.hadoop.hive.ql.metadata.Hive.getDatabase(Hive.java:1291)
      at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.getDatabase(BaseSemanticAnalyzer.java:1364)
      at org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeDropDatabase(DDLSemanticAnalyzer.java:777)
      at org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeInternal(DDLSemanticAnalyzer.java:427)
      at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:224)
      at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:425)
      at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:309)
      at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1116)
      at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1164)
      at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1053)
      at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1043)
      at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:207)
      at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:159)
      at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:370)
      at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:754)
      at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675)
      at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:615)

        Attachments

        1. HIVE-9920.patch
          1 kB
          Chaoyu Tang
        2. HIVE-9920.patch
          1 kB
          Chaoyu Tang

          Activity

            People

            • Assignee:
              ctang.ma Chaoyu Tang
              Reporter:
              ctang.ma Chaoyu Tang
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: