I started the server with aa...@jargon:~/src/ext/svn/hive-0.3.0/build/dist/bin$ HIVE_PORT=10000 ./hive --service hiveserver It appeared to start correctly.
Then ran the test using the ant command-line you gave me. It connected to the hiveserver (some output appeared there, including many SqlExceptions regarding indices that already exist), but the test fails: test: [junit] Running org.apache.hadoop.hive.jdbc.TestJdbcDriver [junit] Hive history file=/home/aaron/src/ext/svn/hive-0.3.0/jdbc/../build/ql/tmp/hive_job_log_aaron_200905141328_716976076.txt [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 1.836 sec [junit] Test org.apache.hadoop.hive.jdbc.TestJdbcDriver FAILED BUILD FAILED /home/aaron/src/ext/svn/hive-0.3.0/build.xml:166: The following error occurred while executing this line: /home/aaron/src/ext/svn/hive-0.3.0/build-common.xml:269: Tests failed! I've attached the test log. - Aaron On Wed, May 13, 2009 at 8:30 PM, Raghu Murthy <rmur...@facebook.com> wrote: > Ok, one more test. Can you apply the attached patch and then run the > following? > > 1. rebuild > 2. from dist/bin, run hive server on localhost port 10000 > 3. from trunk, run ant test -Dtestcase=TestJdbcDriver -Dstandalone=true > > Does the test succeed? > > On 5/13/09 4:13 PM, "Aaron Kimball" <aa...@cloudera.com> wrote: > > > I can in fact run the hive cli. I created a table named foo and can > describe > > it, select from it, etc. > > > > I also tried to run 'SELECT * FROM foo' via JDBC and that failed as well. > > - Aaron > > > > On Wed, May 13, 2009 at 4:02 PM, Raghu Murthy <rmur...@facebook.com> > wrote: > >> Are you able to run the hive cli from the same installation? There are > >> currently some issues while running metadata-only calls (show, describe) > via > >> JDBC. Regular queries should be fine though. > >> > >> > >> On 5/13/09 3:59 PM, "Aaron Kimball" <aa...@cloudera.com> wrote: > >> > >>>> Hi all, > >>>> > >>>> I've been trying to use the Hive JDBC client today with some > frustration. > >>>> >> My > >>>> goal was to execute a simple "SHOW TABLES" statement in Hive. > >>>> > >>>> If I start the Hive server with HIVE_PORT=10000 hive --service > hiveserver, > >>>> >> the > >>>> following happens when I connect to > jdbc:hive://localhost:10000/default: > >>>> java.sql.SQLException: Method not supported > >>>> > >>>> If instead I attempt to connect to jdbc:hive:// (without the > standalone > >>>> hiveserver started), I get: > >>>> java.sql.SQLException: > MetaException(message:hive.metastore.warehouse.dir > >>>> >> is > >>>> not set in the config or blank) > >>>> > >>>> I'm confused where I should set the hive.metastore.warehouse.dir > property. > >>>> I've run this from a directory containing a valid hive-site.xml; this > >>>> directory is named "conf/", so I also tried running my program in that > >>>> directory's parent, thinking it may look for conf/hive-default.xml and > >>>> conf/hive-site.xml. How do I set the configuration files that will be > >>> loaded > >>>> inside the call to DriverManager.getConnection()? And in the case of > the > >>>> standalone server, does anyone have any insight into why I'd get > "method >> > >>>> not > >>>> supported" ? > >>>> > >>>> FWIW, the program I ran was invoked via 'hadoop jar ...'; I don't know > if > >>>> launching a program in this way would mess up Hive's config paths, > etc. > >>> This > >>>> is Hadoop 0.18.3, Hive 0.3.0. > >>>> > >>>> Thanks, > >>>> - Aaron > >> > > > >
<?xml version="1.0" encoding="UTF-8" ?> <testsuite errors="0" failures="1" hostname="jargon" name="org.apache.hadoop.hive.jdbc.TestJdbcDriver" tests="1" time="1.496" timestamp="2009-05-14T20:31:59"> <properties> <property name="java.vendor" value="Sun Microsystems Inc." /> <property name="qfile" value="" /> <property name="sun.java.launcher" value="SUN_STANDARD" /> <property name="sun.management.compiler" value="HotSpot Tiered Compilers" /> <property name="test.data.dir" value="/home/aaron/src/ext/svn/hive-0.3.0/build/jdbc/test/data" /> <property name="hadoop.jar" value="/home/aaron/src/ext/svn/hive-0.3.0/build/hadoopcore/hadoop-0.18.3/hadoop-0.18.3-core.jar" /> <property name="os.name" value="Linux" /> <property name="sun.boot.class.path" value="/usr/java/jdk1.6.0_11/jre/lib/resources.jar:/usr/java/jdk1.6.0_11/jre/lib/rt.jar:/usr/java/jdk1.6.0_11/jre/lib/sunrsasign.jar:/usr/java/jdk1.6.0_11/jre/lib/jsse.jar:/usr/java/jdk1.6.0_11/jre/lib/jce.jar:/usr/java/jdk1.6.0_11/jre/lib/charsets.jar:/usr/java/jdk1.6.0_11/jre/classes" /> <property name="ivy.installed" value="true" /> <property name="standalone" value="true" /> <property name="sun.desktop" value="gnome" /> <property name="java.vm.specification.vendor" value="Sun Microsystems Inc." /> <property name="ant.home" value="/usr/share/ant" /> <property name="ant.file.hivecommon" value="/home/aaron/src/ext/svn/hive-0.3.0/build-common.xml" /> <property name="java.runtime.version" value="1.6.0_11-b03" /> <property name="test.build.dir" value="/home/aaron/src/ext/svn/hive-0.3.0/build/jdbc/test" /> <property name="ql.test.results.clientpositive.dir" value="${ql.test.results.clientpositive.dir}" /> <property name="build.dir.hadoop" value="/home/aaron/src/ext/svn/hive-0.3.0/build/hadoopcore" /> <property name="test.service.standalone.server" value="true" /> <property name="user.name" value="aaron" /> <property name="hadoop.conf.dir" value="/home/aaron/src/ext/svn/hive-0.3.0/build/hadoopcore/hadoop-0.18.3/conf" /> <property name="javac.version" value="1.5" /> <property name="ivy.home" value="/home/aaron/.ant" /> <property name="log4j.configuration" value="file:///home/aaron/src/ext/svn/hive-0.3.0/build/jdbc/test/data/conf/hive-log4j.properties" /> <property name="javac.optimize" value="on" /> <property name="ant.file.get_ivy" value="/home/aaron/src/ext/svn/hive-0.3.0/ivy/get_ivy.xml" /> <property name="deploy.dir" value="/home/aaron/src/ext/svn/hive-0.3.0/build" /> <property name="build.dir" value="/home/aaron/src/ext/svn/hive-0.3.0/build/jdbc" /> <property name="javac.deprecation" value="off" /> <property name="user.language" value="en" /> <property name="build.encoding" value="ISO-8859-1" /> <property name="test.output" value="true" /> <property name="sun.boot.library.path" value="/usr/java/jdk1.6.0_11/jre/lib/i386" /> <property name="ivy.jar.dir" value="/home/aaron/.ant/lib" /> <property name="test.build.src" value="/home/aaron/src/ext/svn/hive-0.3.0/build/jdbc/test/src" /> <property name="ant.project.name" value="jdbc" /> <property name="java.version" value="1.6.0_11" /> <property name="version" value="0.3.0" /> <property name="user.timezone" value="" /> <property name="sun.arch.data.model" value="32" /> <property name="test.src.dir" value="/home/aaron/src/ext/svn/hive-0.3.0/jdbc/src/test" /> <property name="java.endorsed.dirs" value="/usr/java/jdk1.6.0_11/jre/lib/endorsed" /> <property name="sun.cpu.isalist" value="" /> <property name="sun.jnu.encoding" value="UTF-8" /> <property name="file.encoding.pkg" value="sun.io" /> <property name="test.src.data.dir" value="/home/aaron/src/ext/svn/hive-0.3.0/data" /> <property name="file.separator" value="/" /> <property name="java.specification.name" value="Java Platform API Specification" /> <property name="test.log.dir" value="/home/aaron/src/ext/svn/hive-0.3.0/build/jdbc/test/logs" /> <property name="java.class.version" value="50.0" /> <property name="user.country" value="US" /> <property name="ant.file.jdbc" value="/home/aaron/src/ext/svn/hive-0.3.0/jdbc/build.xml" /> <property name="java.home" value="/usr/java/jdk1.6.0_11/jre" /> <property name="dist.dir" value="/home/aaron/src/ext/svn/hive-0.3.0" /> <property name="java.vm.info" value="mixed mode" /> <property name="hive.conf.dir" value="/home/aaron/src/ext/svn/hive-0.3.0/conf" /> <property name="ant.file" value="/home/aaron/src/ext/svn/hive-0.3.0/jdbc/build.xml" /> <property name="os.version" value="2.6.27-14-generic" /> <property name="hadoopcore.install.done" value="true" /> <property name="test.classpath.id" value="test.classpath" /> <property name="test.include" value="Test*" /> <property name="javac.debug" value="on" /> <property name="hadoop.version" value="0.18.3" /> <property name="path.separator" value=":" /> <property name="java.vm.version" value="11.0-b16" /> <property name="hive.aux.jars.path" value="/home/aaron/src/ext/svn/hive-0.3.0/build/jdbc/test/test-udfs.jar,/home/aaron/src/ext/svn/hive-0.3.0/data/files/TestSerDe.jar" /> <property name="ant.library.dir" value="/usr/share/ant/lib" /> <property name="test.junit.output.format" value="xml" /> <property name="java.awt.printerjob" value="sun.print.PSPrinterJob" /> <property name="sun.io.unicode.encoding" value="UnicodeLittle" /> <property name="hadoop.mirror" value="http://archive.apache.org/dist" /> <property name="testcase" value="TestJdbcDriver" /> <property name="user.home" value="/home/aaron" /> <property name="java.specification.vendor" value="Sun Microsystems Inc." /> <property name="java.vendor.url" value="http://java.sun.com/" /> <property name="name" value="hive" /> <property name="java.library.path" value="/usr/java/jdk1.6.0_11/jre/lib/i386/server:/usr/java/jdk1.6.0_11/jre/lib/i386:/usr/java/jdk1.6.0_11/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib" /> <property name="java.vm.vendor" value="Sun Microsystems Inc." /> <property name="java.runtime.name" value="Java(TM) SE Runtime Environment" /> <property name="year" value="2009" /> <property name="java.class.path" value="/home/aaron/src/ext/svn/hive-0.3.0/build/jdbc/test/classes:/home/aaron/src/ext/svn/hive-0.3.0/jdbc:/home/aaron/src/ext/svn/hive-0.3.0/build/jdbc/test/data/conf:/home/aaron/src/ext/svn/hive-0.3.0/conf:/home/aaron/src/ext/svn/hive-0.3.0/data/files/TestSerDe.jar:/home/aaron/src/ext/svn/hive-0.3.0/testlibs/junit-3.8.1.jar:/home/aaron/src/ext/svn/hive-0.3.0/build/common/classes:/home/aaron/src/ext/svn/hive-0.3.0/build/serde/classes:/home/aaron/src/ext/svn/hive-0.3.0/build/metastore/classes:/home/aaron/src/ext/svn/hive-0.3.0/build/ql/classes:/home/aaron/src/ext/svn/hive-0.3.0/build/cli/classes:/home/aaron/src/ext/svn/hive-0.3.0/build/hadoopcore/hadoop-0.18.3/hadoop-0.18.3-core.jar:/home/aaron/src/ext/svn/hive-0.3.0/build/hive_anttasks.jar:/home/aaron/src/ext/svn/hive-0.3.0/build/hive_cli.jar:/home/aaron/src/ext/svn/hive-0.3.0/build/hive_common.jar:/home/aaron/src/ext/svn/hive-0.3.0/build/hive_exec.jar:/home/aaron/src/ext/svn/hive-0.3.0/build/hive_hwi.jar:/home/aaron/src/ext/svn/hive-0.3.0/build/hive_jdbc.jar:/home/aaron/src/ext/svn/hive-0.3.0/build/hive_metastore.jar:/home/aaron/src/ext/svn/hive-0.3.0/build/hive_serde.jar:/home/aaron/src/ext/svn/hive-0.3.0/build/hive_service.jar:/home/aaron/src/ext/svn/hive-0.3.0/lib/asm-3.1.jar:/home/aaron/src/ext/svn/hive-0.3.0/lib/commons-cli-2.0-SNAPSHOT.jar:/home/aaron/src/ext/svn/hive-0.3.0/lib/commons-collections-3.2.1.jar:/home/aaron/src/ext/svn/hive-0.3.0/lib/commons-lang-2.4.jar:/home/aaron/src/ext/svn/hive-0.3.0/lib/commons-logging-1.0.4.jar:/home/aaron/src/ext/svn/hive-0.3.0/lib/commons-logging-api-1.0.4.jar:/home/aaron/src/ext/svn/hive-0.3.0/lib/derby.jar:/home/aaron/src/ext/svn/hive-0.3.0/lib/jdo2-api-2.1.jar:/home/aaron/src/ext/svn/hive-0.3.0/lib/jpox-core-1.2.2.jar:/home/aaron/src/ext/svn/hive-0.3.0/lib/jpox-enhancer-1.2.2.jar:/home/aaron/src/ext/svn/hive-0.3.0/lib/jpox-rdbms-1.2.2.jar:/home/aaron/src/ext/svn/hive-0.3.0/lib/json.jar:/home/aaron/src/ext/svn/hive-0.3.0/lib/libfb303.jar:/home/aaron/src/ext/svn/hive-0.3.0/lib/libthrift.jar:/home/aaron/src/ext/svn/hive-0.3.0/lib/log4j-1.2.15.jar:/home/aaron/src/ext/svn/hive-0.3.0/lib/velocity-1.5.jar:/home/aaron/src/ext/svn/hive-0.3.0/ql/lib/antlr-2.7.7.jar:/home/aaron/src/ext/svn/hive-0.3.0/ql/lib/antlr-3.0.1.jar:/home/aaron/src/ext/svn/hive-0.3.0/ql/lib/antlr-runtime-3.0.1.jar:/home/aaron/src/ext/svn/hive-0.3.0/ql/lib/commons-jexl-1.1.jar:/home/aaron/src/ext/svn/hive-0.3.0/ql/lib/stringtemplate-3.1b1.jar:/usr/share/ant/lib/junit.jar:/usr/share/ant/lib/ant-launcher.jar:/usr/share/ant/lib/ant.jar:/usr/share/ant/lib/ant-junit.jar" /> <property name="ant.version" value="Apache Ant version 1.7.1 compiled on October 3 2008" /> <property name="test.build.classes" value="/home/aaron/src/ext/svn/hive-0.3.0/build/jdbc/test/classes" /> <property name="derby.stream.error.file" value="/home/aaron/src/ext/svn/hive-0.3.0/build/jdbc/test/derby.log" /> <property name="ivy.install.version" value="2.0.0-rc2" /> <property name="ql.test.query.clientpositive.dir" value="${ql.test.query.clientpositive.dir}" /> <property name="hive.root" value="/home/aaron/src/ext/svn/hive-0.3.0" /> <property name="java.vm.specification.name" value="Java Virtual Machine Specification" /> <property name="java.vm.specification.version" value="1.0" /> <property name="build.classes" value="/home/aaron/src/ext/svn/hive-0.3.0/build/jdbc/classes" /> <property name="test.output.overwrite" value="false" /> <property name="sun.os.patch.level" value="unknown" /> <property name="sun.cpu.endian" value="little" /> <property name="javac.args" value="" /> <property name="java.io.tmpdir" value="/tmp" /> <property name="java.vendor.url.bug" value="http://java.sun.com/cgi-bin/bugreport.cgi" /> <property name="hadoop.root.default" value="/home/aaron/src/ext/svn/hive-0.3.0/build/hadoopcore/hadoop-0.18.3" /> <property name="overwrite" value="false" /> <property name="Name" value="Hive" /> <property name="os.arch" value="i386" /> <property name="java.awt.graphicsenv" value="sun.awt.X11GraphicsEnvironment" /> <property name="java.ext.dirs" value="/usr/java/jdk1.6.0_11/jre/lib/ext:/usr/java/packages/lib/ext" /> <property name="user.dir" value="/home/aaron/src/ext/svn/hive-0.3.0/jdbc" /> <property name="ivy.jar.file" value="/home/aaron/.ant/lib/ivy.jar" /> <property name="line.separator" value=" " /> <property name="java.vm.name" value="Java HotSpot(TM) Server VM" /> <property name="basedir" value="/home/aaron/src/ext/svn/hive-0.3.0/jdbc" /> <property name="hadoop.root" value="/home/aaron/src/ext/svn/hive-0.3.0/build/hadoopcore/hadoop-0.18.3" /> <property name="ant.java.version" value="1.6" /> <property name="test.junit.output.usefile" value="true" /> <property name="ant.core.lib" value="/usr/share/ant/lib/ant.jar" /> <property name="test.timeout" value="2700000" /> <property name="file.encoding" value="UTF-8" /> <property name="ant.file.hive" value="/home/aaron/src/ext/svn/hive-0.3.0/build.xml" /> <property name="java.specification.version" value="1.6" /> <property name="src.dir" value="/home/aaron/src/ext/svn/hive-0.3.0/jdbc/src" /> <property name="build.dir.hive" value="/home/aaron/src/ext/svn/hive-0.3.0/build" /> <property name="javac.args.warnings" value="" /> </properties> <testcase classname="org.apache.hadoop.hive.jdbc.TestJdbcDriver" name="testHiveDriver" time="1.465"> <failure type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError at junit.framework.Assert.fail(Assert.java:47) at junit.framework.Assert.assertTrue(Assert.java:20) at junit.framework.Assert.assertFalse(Assert.java:34) at junit.framework.Assert.assertFalse(Assert.java:41) at org.apache.hadoop.hive.jdbc.TestJdbcDriver.setUp(TestJdbcDriver.java:57) at junit.framework.TestCase.runBare(TestCase.java:125) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:420) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:768) </failure> </testcase> <system-out><![CDATA[Hive history file=/home/aaron/src/ext/svn/hive-0.3.0/jdbc/../build/ql/tmp/hive_job_log_aaron_200905141331_1906926522.txt ]]></system-out> <system-err><![CDATA[]]></system-err> </testsuite>