Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-26836 Ensure Green Build for Branch-3
  3. HIVE-26940

Backport of HIVE-19882 : Fix QTestUtil session lifecycle

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      A lot of tests on branch-3 are failing with the following errors :

      java.lang.AssertionError: Failed during createSources processLine with code=1	at org.junit.Assert.fail(Assert.java:88)	at org.apache.hadoop.hive.ql.QTestUtil.initFromScript(QTestUtil.java:1219)	at org.apache.hadoop.hive.ql.QTestUtil.createSources(QTestUtil.java:1201)	at org.apache.hadoop.hive.ql.QTestUtil.createSources(QTestUtil.java:1188)	at org.apache.hadoop.hive.cli.control.CoreCliDriver$3.invokeInternal(CoreCliDriver.java:83)	at org.apache.hadoop.hive.cli.control.CoreCliDriver$3.invokeInternal(CoreCliDriver.java:80)	at org.apache.hadoop.hive.util.ElapsedTimeLoggingWrapper.invoke(ElapsedTimeLoggingWrapper.java:33)	at org.apache.hadoop.hive.cli.control.CoreCliDriver.beforeClass(CoreCliDriver.java:86)	at org.apache.hadoop.hive.cli.control.CliAdapter$1$1.evaluate(CliAdapter.java:71)	at org.junit.rules.RunRules.evaluate(RunRules.java:20)	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:379)	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:340)	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:413) 

      This is because hive.test.shutdown.phase is not set to true before the cleanup happens thereby invoking EnforceReadOnlyTables which prevents it from dropping tables while running tests. Below is the stack trace :

      FAILED: Hive Internal Error: org.apache.hadoop.hive.ql.metadata.HiveException(Error while invoking PreHook. hooks: java.lang.RuntimeException: Cannot overwrite read-only table: src	at org.apache.hadoop.hive.ql.hooks.EnforceReadOnlyTables.run(EnforceReadOnlyTables.java:64)	at org.apache.hadoop.hive.ql.hooks.EnforceReadOnlyTables.run(EnforceReadOnlyTables.java:44)	at org.apache.hadoop.hive.ql.HookRunner.invokeGeneralHook(HookRunner.java:296)	at org.apache.hadoop.hive.ql.HookRunner.runPreHooks(HookRunner.java:273)	at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:2304)	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:2039)	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1737)	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1731)	at org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:157)	at org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:218)	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:239)	at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:188)	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:402)	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:335)	at org.apache.hadoop.hive.ql.QTestUtil.cleanupFromFile(QTestUtil.java:1155)	at org.apache.hadoop.hive.ql.QTestUtil.cleanUp(QTestUtil.java:1128)	at org.apache.hadoop.hive.ql.QTestUtil.cleanUp(QTestUtil.java:1112)	at org.apache.hadoop.hive.cli.control.CoreCliDriver$2.invokeInternal(CoreCliDriver.java:75)	at org.apache.hadoop.hive.cli.control.CoreCliDriver$2.invokeInternal(CoreCliDriver.java:72)	at org.apache.hadoop.hive.util.ElapsedTimeLoggingWrapper.invoke(ElapsedTimeLoggingWrapper.java:33)	at org.apache.hadoop.hive.cli.control.CoreCliDriver.beforeClass(CoreCliDriver.java:78)	at org.apache.hadoop.hive.cli.control.CliAdapter$1$1.evaluate(CliAdapter.java:71)	at org.junit.rules.RunRules.evaluate(RunRules.java:20)	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:379)	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:340)	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:413)) 

      In oss master HIVE-19882 fixes this issue by enabling this property thereby not allowing EnforceReadOnlyTables to execute.

      Attachments

        Issue Links

          Activity

            People

              amanraj2520 Aman Raj
              amanraj2520 Aman Raj
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m