You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Raghu Murthy <rm...@facebook.com> on 2009/06/03 20:48:44 UTC

Re: hive jdbc client usage?

I have created a standalone program for hive jdbc at:
http://wiki.apache.org/hadoop/Hive/HiveClient#head-5b27b3a8f9f322945734f470d
1ae58f8afeaa0b4

Let me know if it works.

raghu

On 5/14/09 1:33 PM, "Aaron Kimball" <aa...@cloudera.com> wrote:

> I started the server with
> aaron@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_aaro
> n_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 <rm...@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 <rm...@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
>>>>>> 
>>>> 
>> 
> 


Re: hive jdbc client usage?

Posted by Raghu Murthy <rm...@facebook.com>.
Thanks for writing the script! Please go ahead and add it to the wiki.


On 6/4/09 10:34 AM, "Bill Graham" <bi...@gmail.com> wrote:

> Thanks guys, this works now for me now. The JDOFatalInternalException was
> because the Derby jar was missing from my classpath.  Prasad, there wasn't a
> more detailed stack trace, only what I posted. I'd say that better error
> messaging could help here, but it seems like a hard exception to catch and
> correctly diagnose.
> 
> Either way, here's a script to run the client example in embedded mode that
> might be helpful to others. Should I add it to the wiki?
> 
> #!/bin/bash
> HADOOP_HOME=/path/to/hadoop
> HIVE_HOME=/path/to/dist
> 
> echo -e '1\x01foo' > /tmp/a.txt
> echo -e '2\x01bar' >> /tmp/a.txt
> 
> HADOOP_CORE=`ls $HADOOP_HOME/hadoop-*-core.jar`
> CLASSPATH=.:$HADOOP_CORE:\$HIVE_HOME/conf
> 
> for i in ${HIVE_HOME}/lib/*.jar ; do
>     CLASSPATH=$CLASSPATH:$i
> done
> 
> java -cp $CLASSPATH HiveJdbcClient
> 
> 
> 
> On Wed, Jun 3, 2009 at 1:34 PM, Raghu Murthy <rm...@facebook.com> wrote:
>> It should be a path problem. I am not sure which exact jar you are missing,
>> but by adding  all the jars in $HIVE_HOME/lib, $HIVE_HOME/conf, and
>> $HADOOP_HOME/hadoop-*-core.jar (need to set HADOOP_HOME) to the classpath I
>> was able to run the program in embedded mode.
>> 
>> 
>> On 6/3/09 1:05 PM, "Prasad Chakka" <pc...@facebook.com> wrote:
>> 
>>>> Do you have the jdbc driver in tha path? If you can paste the full chain of
>>>> exceptions, I may be able to tell you exactly what is missing.
>>>> 
>>>> Thanks,
>>>> Prasad
>>>> 
>>>> 
>>>> 
>>>> From: Bill Graham <bi...@gmail.com>
>>>> Reply-To: <hi...@hadoop.apache.org>, <bi...@gmail.com>
>>>> Date: Wed, 3 Jun 2009 12:57:38 -0700
>>>> To: <hi...@hadoop.apache.org>
>>>> Subject: Re: hive jdbc client usage?
>>>> 
>>>> This worked for me against a remote Hive server fyi, but I needed two more
>>>> jars:
>>>> 
>>>> hive_exec.jar
>>>> log4j-1.2.15
>>>> 
>>>> I then tried running it in embedded mode connecting to "jdbc:hive://" and
>>>> >> got
>>>> the same hive.metastore.warehouse.dir exception as Aaron. This seems to be
>>>> because the hive configs aren't being properly loaded. Adding
>>> $HIVE_HOME/conf
>>>> to the classpath remedied that exception, but then I needed a few more jars
>>>> from the Hive dist:
>>>> 
>>>> jdo2-api-2.1.jar
>>>> jpox-core-1.2.2.jar
>>>> jpox-rdbms-1.2.2.jar
>>>> 
>>>> This resulted in the following error:
>>>> 
>>>> 09/06/03 12:45:53 INFO JPOX.Persistence:
>>>> ===========================================================
>>>> Exception in thread "main" java.sql.SQLException:
>>>> javax.jdo.JDOFatalInternalException: Error creating transactional
>>> connection
>>>> factory
>>>> NestedThrowables:
>>>> java.lang.reflect.InvocationTargetException
>>>>         at 
>>> org.apache.hadoop.hive.jdbc.HiveDriver.connect(HiveDriver.java:71)
>>>>         at java.sql.DriverManager.getConnection(DriverManager.java:582)
>>>>         at java.sql.DriverManager.getConnection(DriverManager.java:185)
>>>>         at HiveJdbcClient.main(HiveJdbcClient.java:22)
>>>> 
>>>> Any ideas re how to fix this? Should it be possible to run the client in
>>>> embedded mode in this way?
>>>> 
>>>> thanks,
>>>> Bill
>>>> 
>>>> On Wed, Jun 3, 2009 at 11:48 AM, Raghu Murthy <rm...@facebook.com> wrote:
>>>>>> I have created a standalone program for hive jdbc at:
>>>>>> 
>>>> 
http://wiki.apache.org/hadoop/Hive/HiveClient#head-5b27b3a8f9f322945734f470>>>>
d
>>>>>> 1ae58f8afeaa0b4
>>>>>> 
>> <http://wiki.apache.org/hadoop/Hive/HiveClient#head-5b27b3a8f9f322945734f470d
>> >> >
>> %
>>>>>> 0A1ae58f8afeaa0b4>
>>>>>> 
>>>>>> Let me know if it works.
>>>>>> 
>>>>>> raghu
>>>>>> 
>>>>>> On 5/14/09 1:33 PM, "Aaron Kimball" <aa...@cloudera.com> wrote:
>>>>>> 
>>>>>>>>>> I started the server with
>>>>>>>>>> aaron@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_
>>>>> aa
>>>>>>>> ro
>>>>>>>>>> n_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 <rm...@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
>>>>>>>>>>>> <rm...@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
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>> 
>>>>>> 
>>>> 
>>>> 
>> 
> 


Re: hive jdbc client usage?

Posted by Bill Graham <bi...@gmail.com>.
Thanks guys, this works now for me now. The JDOFatalInternalException was
because the Derby jar was missing from my classpath.  Prasad, there wasn't a
more detailed stack trace, only what I posted. I'd say that better error
messaging could help here, but it seems like a hard exception to catch and
correctly diagnose.

Either way, here's a script to run the client example in embedded mode that
might be helpful to others. Should I add it to the wiki?

#!/bin/bash
HADOOP_HOME=/path/to/hadoop
HIVE_HOME=/path/to/dist

echo -e '1\x01foo' > /tmp/a.txt
echo -e '2\x01bar' >> /tmp/a.txt

HADOOP_CORE=`ls $HADOOP_HOME/hadoop-*-core.jar`
CLASSPATH=.:$HADOOP_CORE:\$HIVE_HOME/conf

for i in ${HIVE_HOME}/lib/*.jar ; do
    CLASSPATH=$CLASSPATH:$i
done

java -cp $CLASSPATH HiveJdbcClient



On Wed, Jun 3, 2009 at 1:34 PM, Raghu Murthy <rm...@facebook.com> wrote:

> It should be a path problem. I am not sure which exact jar you are missing,
> but by adding  all the jars in $HIVE_HOME/lib, $HIVE_HOME/conf, and
> $HADOOP_HOME/hadoop-*-core.jar (need to set HADOOP_HOME) to the classpath I
> was able to run the program in embedded mode.
>
>
> On 6/3/09 1:05 PM, "Prasad Chakka" <pc...@facebook.com> wrote:
>
> > Do you have the jdbc driver in tha path? If you can paste the full chain
> of
> > exceptions, I may be able to tell you exactly what is missing.
> >
> > Thanks,
> > Prasad
> >
> >
> >
> > From: Bill Graham <bi...@gmail.com>
> > Reply-To: <hi...@hadoop.apache.org>, <bi...@gmail.com>
> > Date: Wed, 3 Jun 2009 12:57:38 -0700
> > To: <hi...@hadoop.apache.org>
> > Subject: Re: hive jdbc client usage?
> >
> > This worked for me against a remote Hive server fyi, but I needed two
> more
> > jars:
> >
> > hive_exec.jar
> > log4j-1.2.15
> >
> > I then tried running it in embedded mode connecting to "jdbc:hive://" and
> got
> > the same hive.metastore.warehouse.dir exception as Aaron. This seems to
> be
> > because the hive configs aren't being properly loaded. Adding
> $HIVE_HOME/conf
> > to the classpath remedied that exception, but then I needed a few more
> jars
> > from the Hive dist:
> >
> > jdo2-api-2.1.jar
> > jpox-core-1.2.2.jar
> > jpox-rdbms-1.2.2.jar
> >
> > This resulted in the following error:
> >
> > 09/06/03 12:45:53 INFO JPOX.Persistence:
> > ===========================================================
> > Exception in thread "main" java.sql.SQLException:
> > javax.jdo.JDOFatalInternalException: Error creating transactional
> connection
> > factory
> > NestedThrowables:
> > java.lang.reflect.InvocationTargetException
> >         at
> org.apache.hadoop.hive.jdbc.HiveDriver.connect(HiveDriver.java:71)
> >         at java.sql.DriverManager.getConnection(DriverManager.java:582)
> >         at java.sql.DriverManager.getConnection(DriverManager.java:185)
> >         at HiveJdbcClient.main(HiveJdbcClient.java:22)
> >
> > Any ideas re how to fix this? Should it be possible to run the client in
> > embedded mode in this way?
> >
> > thanks,
> > Bill
> >
> > On Wed, Jun 3, 2009 at 11:48 AM, Raghu Murthy <rm...@facebook.com>
> wrote:
> >> I have created a standalone program for hive jdbc at:
> >>
> http://wiki.apache.org/hadoop/Hive/HiveClient#head-5b27b3a8f9f322945734f470d
> >> 1ae58f8afeaa0b4
> >>
> <
> http://wiki.apache.org/hadoop/Hive/HiveClient#head-5b27b3a8f9f322945734f470d
> >>
> %
> >> 0A1ae58f8afeaa0b4>
> >>
> >> Let me know if it works.
> >>
> >> raghu
> >>
> >> On 5/14/09 1:33 PM, "Aaron Kimball" <aa...@cloudera.com> wrote:
> >>
> >>>> I started the server with
> >>>> aaron@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_aa
> >>> ro
> >>>> n_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 <rm...@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 <
> rmurthy@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
> >>>>>>>>>>>>
> >>>>>>>>>>
> >>>>>>
> >>>>
> >>
> >
> >
>
>

Re: hive jdbc client usage?

Posted by Raghu Murthy <rm...@facebook.com>.
It should be a path problem. I am not sure which exact jar you are missing,
but by adding  all the jars in $HIVE_HOME/lib, $HIVE_HOME/conf, and
$HADOOP_HOME/hadoop-*-core.jar (need to set HADOOP_HOME) to the classpath I
was able to run the program in embedded mode.


On 6/3/09 1:05 PM, "Prasad Chakka" <pc...@facebook.com> wrote:

> Do you have the jdbc driver in tha path? If you can paste the full chain of
> exceptions, I may be able to tell you exactly what is missing.
> 
> Thanks,
> Prasad
> 
> 
> 
> From: Bill Graham <bi...@gmail.com>
> Reply-To: <hi...@hadoop.apache.org>, <bi...@gmail.com>
> Date: Wed, 3 Jun 2009 12:57:38 -0700
> To: <hi...@hadoop.apache.org>
> Subject: Re: hive jdbc client usage?
> 
> This worked for me against a remote Hive server fyi, but I needed two more
> jars:
> 
> hive_exec.jar
> log4j-1.2.15
> 
> I then tried running it in embedded mode connecting to "jdbc:hive://" and got
> the same hive.metastore.warehouse.dir exception as Aaron. This seems to be
> because the hive configs aren't being properly loaded. Adding $HIVE_HOME/conf
> to the classpath remedied that exception, but then I needed a few more jars
> from the Hive dist:
> 
> jdo2-api-2.1.jar
> jpox-core-1.2.2.jar
> jpox-rdbms-1.2.2.jar
> 
> This resulted in the following error:
> 
> 09/06/03 12:45:53 INFO JPOX.Persistence:
> ===========================================================
> Exception in thread "main" java.sql.SQLException:
> javax.jdo.JDOFatalInternalException: Error creating transactional connection
> factory
> NestedThrowables:
> java.lang.reflect.InvocationTargetException
>         at org.apache.hadoop.hive.jdbc.HiveDriver.connect(HiveDriver.java:71)
>         at java.sql.DriverManager.getConnection(DriverManager.java:582)
>         at java.sql.DriverManager.getConnection(DriverManager.java:185)
>         at HiveJdbcClient.main(HiveJdbcClient.java:22)
> 
> Any ideas re how to fix this? Should it be possible to run the client in
> embedded mode in this way?
> 
> thanks,
> Bill
> 
> On Wed, Jun 3, 2009 at 11:48 AM, Raghu Murthy <rm...@facebook.com> wrote:
>> I have created a standalone program for hive jdbc at:
>> http://wiki.apache.org/hadoop/Hive/HiveClient#head-5b27b3a8f9f322945734f470d
>> 1ae58f8afeaa0b4 
>> 
<http://wiki.apache.org/hadoop/Hive/HiveClient#head-5b27b3a8f9f322945734f470d>>
%
>> 0A1ae58f8afeaa0b4>
>> 
>> Let me know if it works.
>> 
>> raghu
>> 
>> On 5/14/09 1:33 PM, "Aaron Kimball" <aa...@cloudera.com> wrote:
>> 
>>>> I started the server with
>>>> aaron@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_aa
>>> ro
>>>> n_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 <rm...@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 <rm...@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
>>>>>>>>>>>> 
>>>>>>>>>> 
>>>>>> 
>>>> 
>> 
> 
> 


Re: hive jdbc client usage?

Posted by Prasad Chakka <pc...@facebook.com>.
Do you have the jdbc driver in tha path? If you can paste the full chain of exceptions, I may be able to tell you exactly what is missing.

Thanks,
Prasad


________________________________
From: Bill Graham <bi...@gmail.com>
Reply-To: <hi...@hadoop.apache.org>, <bi...@gmail.com>
Date: Wed, 3 Jun 2009 12:57:38 -0700
To: <hi...@hadoop.apache.org>
Subject: Re: hive jdbc client usage?

This worked for me against a remote Hive server fyi, but I needed two more jars:

hive_exec.jar
log4j-1.2.15

I then tried running it in embedded mode connecting to "jdbc:hive://" and got the same hive.metastore.warehouse.dir exception as Aaron. This seems to be because the hive configs aren't being properly loaded. Adding $HIVE_HOME/conf to the classpath remedied that exception, but then I needed a few more jars from the Hive dist:

jdo2-api-2.1.jar
jpox-core-1.2.2.jar
jpox-rdbms-1.2.2.jar

This resulted in the following error:

09/06/03 12:45:53 INFO JPOX.Persistence: ===========================================================
Exception in thread "main" java.sql.SQLException: javax.jdo.JDOFatalInternalException: Error creating transactional connection factory
NestedThrowables:
java.lang.reflect.InvocationTargetException
        at org.apache.hadoop.hive.jdbc.HiveDriver.connect(HiveDriver.java:71)
        at java.sql.DriverManager.getConnection(DriverManager.java:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:185)
        at HiveJdbcClient.main(HiveJdbcClient.java:22)

Any ideas re how to fix this? Should it be possible to run the client in embedded mode in this way?

thanks,
Bill

On Wed, Jun 3, 2009 at 11:48 AM, Raghu Murthy <rm...@facebook.com> wrote:
I have created a standalone program for hive jdbc at:
http://wiki.apache.org/hadoop/Hive/HiveClient#head-5b27b3a8f9f322945734f470d
1ae58f8afeaa0b4 <http://wiki.apache.org/hadoop/Hive/HiveClient#head-5b27b3a8f9f322945734f470d%0A1ae58f8afeaa0b4>

Let me know if it works.

raghu

On 5/14/09 1:33 PM, "Aaron Kimball" <aa...@cloudera.com> wrote:

> I started the server with
> aaron@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_aaro
> n_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 <rm...@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 <rm...@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
>>>>>>
>>>>
>>
>




Re: hive jdbc client usage?

Posted by Bill Graham <bi...@gmail.com>.
This worked for me against a remote Hive server fyi, but I needed two more
jars:

hive_exec.jar
log4j-1.2.15

I then tried running it in embedded mode connecting to "jdbc:hive://" and
got the same hive.metastore.warehouse.dir exception as Aaron. This seems to
be because the hive configs aren't being properly loaded. Adding
$HIVE_HOME/conf to the classpath remedied that exception, but then I needed
a few more jars from the Hive dist:

jdo2-api-2.1.jar
jpox-core-1.2.2.jar
jpox-rdbms-1.2.2.jar

This resulted in the following error:

09/06/03 12:45:53 INFO JPOX.Persistence:
===========================================================
Exception in thread "main" java.sql.SQLException:
javax.jdo.JDOFatalInternalException: Error creating transactional connection
factory
NestedThrowables:
java.lang.reflect.InvocationTargetException
        at
org.apache.hadoop.hive.jdbc.HiveDriver.connect(HiveDriver.java:71)
        at java.sql.DriverManager.getConnection(DriverManager.java:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:185)
        at HiveJdbcClient.main(HiveJdbcClient.java:22)

Any ideas re how to fix this? Should it be possible to run the client in
embedded mode in this way?

thanks,
Bill

On Wed, Jun 3, 2009 at 11:48 AM, Raghu Murthy <rm...@facebook.com> wrote:

> I have created a standalone program for hive jdbc at:
>
> http://wiki.apache.org/hadoop/Hive/HiveClient#head-5b27b3a8f9f322945734f470d
> 1ae58f8afeaa0b4<http://wiki.apache.org/hadoop/Hive/HiveClient#head-5b27b3a8f9f322945734f470d%0A1ae58f8afeaa0b4>
>
> Let me know if it works.
>
> raghu
>
> On 5/14/09 1:33 PM, "Aaron Kimball" <aa...@cloudera.com> wrote:
>
> > I started the server with
> > aaron@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_aaro
> > n_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 <rm...@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 <rm...@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
> >>>>>>
> >>>>
> >>
> >
>
>