hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Venki Korukanti (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-7684) Avoid validating hook EnforceReadOnlyTable during test driver cleanup.
Date Tue, 12 Aug 2014 11:11:12 GMT

     [ https://issues.apache.org/jira/browse/HIVE-7684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Venki Korukanti updated HIVE-7684:
----------------------------------

    Attachment: HIVE-7684.1.patch


Looks like join1.q is running in {{TestMinimrCliDriver}} and excluded from {{TestCliDriver}}
as part of change [HIVE-1523|https://github.com/apache/hive/commit/aedf285c427067b3e2de90c02d3c0c3c012ee1b4].
So when join1.q is given as qfile argument to TestCliDriver, QTestGenTask doesn't generate
any test code for join1.q in TestCliDriver.java as the test join1.q is part of excluded list.

Regarding the RuntimeException it seems like a regression from HIVE-7519 (See [here|https://github.com/apache/hive/commit/80eddc3efca39db0ec37a210e824a021fb64b325#diff-f9f41107a2e13195f87579dee43a28cdL595]).
Before HIVE-7519, QTestUtil used to delete the test tables directly from the metastore through
{{Hive}} instance, but HIVE-7519 has changed the deletion to go through Driver which executes
the hooks. Error occurred when executing hook {{EnforeceReadOnlyTables}} for deleting a table
that is exempt from deleting in a test script ({{test.src.tables}} in root pom.xml). However
this deletion happens in TestCliDriver shutdown which is valid. 

Attached a patch which sets a config property during test driver shutdown so that {{EnforceReadOnlyTables}}
can avoid validating just for test table cleanup.

> Avoid validating hook EnforceReadOnlyTable during  test driver cleanup.
> -----------------------------------------------------------------------
>
>                 Key: HIVE-7684
>                 URL: https://issues.apache.org/jira/browse/HIVE-7684
>             Project: Hive
>          Issue Type: Test
>          Components: Tests
>            Reporter: Szehon Ho
>            Assignee: Venki Korukanti
>         Attachments: HIVE-7684.1.patch
>
>
> For some strange reason, join1.q has not been running on trunk (see latest pre-commit
builds).
> I tried running manually and got the following exception, which quits the framework.
> {noformat}
> Cleaning up TestCliDriver
> PREHOOK: query: DROP TABLE IF EXISTS src
> PREHOOK: type: DROPTABLE
> PREHOOK: Input: default@src
> PREHOOK: Output: default@src
> FAILED: Hive Internal Error: java.lang.RuntimeException(Cannot overwrite read-only table:
src)
> java.lang.RuntimeException: Cannot overwrite read-only table: src
> 	at org.apache.hadoop.hive.ql.hooks.EnforceReadOnlyTables.run(EnforceReadOnlyTables.java:71)
> 	at org.apache.hadoop.hive.ql.hooks.EnforceReadOnlyTables.run(EnforceReadOnlyTables.java:56)
> 	at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1263)
> 	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1136)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:960)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:950)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:265)
> 	at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:217)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:427)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:363)
> 	at org.apache.hadoop.hive.ql.QTestUtil.cleanUp(QTestUtil.java:625)
> 	at org.apache.hadoop.hive.ql.QTestUtil.shutdown(QTestUtil.java:386)
> 	at org.apache.hadoop.hive.cli.TestSparkCliDriver.tearDown(TestSparkCliDriver.java:87)
> 	at junit.framework.TestCase.runBare(TestCase.java:140)
> 	at junit.framework.TestResult$1.protect(TestResult.java:110)
> 	at junit.framework.TestResult.runProtected(TestResult.java:128)
> 	at junit.framework.TestResult.run(TestResult.java:113)
> 	at junit.framework.TestCase.run(TestCase.java:124)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:243)
> 	at junit.framework.TestSuite.run(TestSuite.java:238)
> 	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
> 	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
> 	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
> 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message