Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive, mail # user - Fwd: what changes required in hive conf xml when working with hive jdbc


Copy link to this message
-
Fwd: what changes required in hive conf xml when working with hive jdbc
Alok Kumar 2011-11-24, 13:48
---------- Forwarded message ----------
From: Alok Kumar <[EMAIL PROTECTED]>
Date: Thu, Nov 24, 2011 at 7:18 PM
Subject: Re: what changes required in hive conf xml when working with hive
jdbc
To: Vikas Srivastava <[EMAIL PROTECTED]>
Hi,

Its working fine at $hive shell. No error, Able to create tables...

I'm trying to connect using hive jdbc following this
https://cwiki.apache.org/confluence/display/Hive/HiveClient , a java sample
code is there

user@ubuntu:~$ java -cp $CLASSPATH HiveJdbcClient
Exception in thread "main" java.lang.NoClassDefFoundError: HiveJdbcClient
Caused by: java.lang.ClassNotFoundException: HiveJdbcClient
 at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: HiveJdbcClient.  Program will exit.

i've set the correct $CLASSPATH and error was gone... but *control never
returned to $Shell*..

i looked in my $hive shell with* show tables; *command... there wasn't any
table created "testHiveDriverTable" as in my java sample code frm
https://cwiki.apache.org/confluence/display/Hive/HiveClient..

ny idea..?

Thanks,
Alok

On Thu, Nov 24, 2011 at 6:37 PM, Vikas Srivastava <
[EMAIL PROTECTED]> wrote:

> Wat Error you are getting  when run show tables;  or create table *
>
> On Thu, Nov 24, 2011 at 6:01 PM, Alok Kumar <[EMAIL PROTECTED]> wrote:
>
>> Hi All,
>>
>> Thanks for reply.
>>
>> @Vikas : I've just run,
>> user@ubuntu:~$ sudo netstat -plten | grep 10000
>> tcp6       0      0 :::10000                :::*
>>  LISTEN      1000       253333      22444/java
>>
>> i thnk thrift server is running
>>
>> i run "*ant test -Dtestcase=TestHiveServer -Dstandalone=true*" from "
>> https://cwiki.apache.org/confluence/display/Hive/HiveServer"
>> which says BUILD FAILED..!
>> while "*ant test -Dtestcase=TestJdbcServer -Dstandalone=true*" is
>> Successful
>>
>> my hive-default.xml contains...
>> **************************************
>> <property>
>>   <name>javax.jdo.option.ConnectionURL</name>
>> <!-- <value>jdbc:hive://localhost:10000/default</value>-->// I tried
>> switching to this, but no help
>>  <value>jdbc:derby:;databaseName=metastore_db;create=true</value>
>>   <description>JDBC connect string for a JDBC metastore</description>
>> </property>
>>
>> <property>
>>   <name>javax.jdo.option.ConnectionDriverName</name>
>>   <value>org.apache.derby.jdbc.EmbeddedDriver</value>
>>  <!-- <value>org.apache.hadoop.hive.jdbc.HiveDriver</value>-->
>>   <description>Driver class name for a JDBC metastore</description>
>> </property>
>> ***************************************************
>> do i need to change anything  here?
>> my jdbc client sample code is trying to connect to "jdbc:hive:
>> //localhost:10000/default"
>>
>> what's ur opinion?
>>
>> Thanks,
>> Alok
>>
>>
>> On Thu, Nov 24, 2011 at 5:37 PM, Vikas Srivastava <
>> [EMAIL PROTECTED]> wrote:
>>
>>> for thrift sever u can check that
>>>
>>> by  netstat -plten | grep 10000
>>>
>>> it runs of 10000 port
>>>
>>> On Thu, Nov 24, 2011 at 5:28 PM, shashwat shriparv <
>>> [EMAIL PROTECTED]> wrote:
>>>
>>>> https://cwiki.apache.org/confluence/display/Hive/HiveClient
>>>>
>>>> https://cwiki.apache.org/confluence/display/Hive/HiveJDBCInterface
>>>>
>>>> https://cwiki.apache.org/confluence/display/Hive/Home
>>>>
>>>>
>>>> On Thu, Nov 24, 2011 at 3:37 PM, Alok Kumar <[EMAIL PROTECTED]> wrote:
>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> Do I need to make any change in hive configuration file when working
>>>>> with hive-jdbc?
>>>>>
>>>>> I'm trying to configure Hive Jdbc following this link
>>>>> https://cwiki.apache.org/confluence/display/Hive/HiveClient.<https://cwiki.apache.org/confluence/display/Hive/HiveClient>
>>

Alok Kumar

Alok Kumar