Skip to content

Instantly share code, notes, and snippets.

@sit
Created November 29, 2011 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sit/1406734 to your computer and use it in GitHub Desktop.
Save sit/1406734 to your computer and use it in GitHub Desktop.
Script to clean and run Hive's archive.q test
ant clean
ant package
(cd metastore && ant model-jar)
ant test -Dtestcase=TestCliDriver -Dqfile=archive.q
@sit
Copy link
Author

sit commented Nov 29, 2011

When run against a clean untar of http://archive.cloudera.com/cdh/3/hive-0.7.0-cdh3u0.tar.gz I get:

[junit] Begin query: archive.q
[junit] Deleted file:/tmp/hive-0.7.0-cdh3u0/src/build/ql/test/data/warehouse/tstsrc
[junit] archive -archiveName NAME -p <parent path> <src>* <dest>
[junit] 
[junit] Invalid usage.
[junit] junit.framework.AssertionFailedError: Client Execution failed with error code = 9
[junit] See build/ql/tmp/hive.log, or try "ant test ... -Dtest.silent=false" to get more logs.
[junit]     at junit.framework.Assert.fail(Assert.java:47)
[junit]     at org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_archive(TestCliDriver.java:109)
[junit]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit]     at java.lang.reflect.Method.invoke(Method.java:597)
[junit]     at junit.framework.TestCase.runTest(TestCase.java:154)
[junit]     at junit.framework.TestCase.runBare(TestCase.java:127)
[junit]     at junit.framework.TestResult$1.protect(TestResult.java:106)
[junit]     at junit.framework.TestResult.runProtected(TestResult.java:124)
[junit]     at junit.framework.TestResult.run(TestResult.java:109)
[junit]     at junit.framework.TestCase.run(TestCase.java:118)
[junit]     at junit.framework.TestSuite.runTest(TestSuite.java:208)
[junit]     at junit.framework.TestSuite.run(TestSuite.java:203)
[junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:518)
[junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1052)
[junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906)
[junit] Exception: Client Execution failed with error code = 9
[junit] See build/ql/tmp/hive.log, or try "ant test ... -Dtest.silent=false" to get more logs.
[junit] Cleaning up TestCliDriver
[junit] Tests run: 2, Failures: 1, Errors: 0, Time elapsed: 24.864 sec
[junit] Test org.apache.hadoop.hive.cli.TestCliDriver FAILED

But against a clone of https://github.com/apache/hive.git checked out to release-0.7.0, the test runs fine. One notable difference appears to be that the cdh3u0 sources download a Cloudera version of Hive 0.20.2 and the release-0.7.0 tag downloads 0.20.3-CDH3-SNAPSHOT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment