hive-dev mailing list archives

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


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|].
So when join1.q is given as qfile argument to TestCliDriver, QTestGenTask doesn't generate
any test code for join1.q in as the test join1.q is part of excluded list.

Regarding the RuntimeException it seems like a regression from HIVE-7519 (See [here|]).
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:
>             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
> I tried running manually and got the following exception, which quits the framework.
> {noformat}
> Cleaning up TestCliDriver
> PREHOOK: Input: default@src
> PREHOOK: Output: default@src
> FAILED: Hive Internal Error: java.lang.RuntimeException(Cannot overwrite read-only table:
> java.lang.RuntimeException: Cannot overwrite read-only table: src
> 	at
> 	at
> 	at org.apache.hadoop.hive.ql.Driver.execute(
> 	at org.apache.hadoop.hive.ql.Driver.runInternal(
> 	at
> 	at
> 	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(
> 	at org.apache.hadoop.hive.cli.CliDriver.processCmd(
> 	at org.apache.hadoop.hive.cli.CliDriver.processLine(
> 	at org.apache.hadoop.hive.cli.CliDriver.processLine(
> 	at org.apache.hadoop.hive.ql.QTestUtil.cleanUp(
> 	at org.apache.hadoop.hive.ql.QTestUtil.shutdown(
> 	at org.apache.hadoop.hive.cli.TestSparkCliDriver.tearDown(
> 	at junit.framework.TestCase.runBare(
> 	at junit.framework.TestResult$1.protect(
> 	at junit.framework.TestResult.runProtected(
> 	at
> 	at
> 	at junit.framework.TestSuite.runTest(
> 	at
> 	at
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(
> 	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(
> 	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(
> 	at org.apache.maven.surefire.booter.ForkedBooter.main(
> {noformat}

This message was sent by Atlassian JIRA

View raw message