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

UpdateInputAccessTimeHook fails for non-current database

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Component/s: None
    • Labels:
      None

      Description

      Steps to reproduce:

      STEP 1. Create DBs and tables

      hive> create database temp;
      hive> use temp;
      hive> create table test(id int);
      hive> create database temp2;
      hive> use temp2;
      hive> create table test2(id int);
      

      STEP 2. Set hive.exec.pre.hooks

      hive> set hive.exec.pre.hooks=org.apache.hadoop.hive.ql.hooks.UpdateInputAccessTimeHook$PreExec;
      

      STEP 3. Use desc

      hive> use temp;
      hive> desc temp2.test2;
      

      EXPECTED RESULT

      Code works fine and shows table info

      ACTUAL RESULT

      FAILED: Hive Internal Error: org.apache.hadoop.hive.ql.metadata.InvalidTableException(Table not found test2)
      org.apache.hadoop.hive.ql.metadata.InvalidTableException: Table not found test2
      	at org.apache.hadoop.hive.ql.metadata.Hive.getTable(Hive.java:1258)
      	at org.apache.hadoop.hive.ql.metadata.Hive.getTable(Hive.java:1209)
      	at org.apache.hadoop.hive.ql.metadata.Hive.getTable(Hive.java:1196)
      	at org.apache.hadoop.hive.ql.hooks.UpdateInputAccessTimeHook$PreExec.run(UpdateInputAccessTimeHook.java:61)
      	at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1688)
      	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1454)
      	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1172)
      	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1162)
      	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:234)
      	at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:185)
      	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:401)
      	at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:791)
      	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:729)
      	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:652)
      	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:647)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
      	at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
      

        Attachments

        1. HIVE-18060.2.patch
          5 kB
          Oleksiy Sayankin
        2. HIVE-18060.1.patch
          2 kB
          Oleksiy Sayankin

          Issue Links

            Activity

              People

              • Assignee:
                osayankin Oleksiy Sayankin
                Reporter:
                osayankin Oleksiy Sayankin
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: