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

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


+
Alok Kumar 2011-11-24, 10:07
+
shashwat shriparv 2011-11-24, 11:58
+
Vikas Srivastava 2011-11-24, 12:07
Copy link to this message
-
Re: what changes required in hive conf xml when working with hive jdbc
Alok Kumar 2011-11-24, 12:31
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>
>>>
>>> hive is up n running. I'm able to create table (or) execute queries at
>>> $hive>
>>>
>>> jps returns :
>>> user@ubuntu:~$ jps
>>> 14202 JobTracker
>>> 14624 HMaster
>>> 16137 JUnitTestRunner
>>> 13809 DataNode
>>> 14864 RunJar
>>> 16392 Jps
>>> 15414 HiveJdbcClient
>>> 14077 SecondaryNameNode
>>> 13573 NameNode
>>> 14441 TaskTracker
>>> 16011 Launcher
>>> 15251 RunJar
>>> 15161 Main
>>>
>>> I've run Hive server as
>>> $HIVE_HOME: bin/hive --service hiveserver
>>> Starting Hive Thrift Server
>>> WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated.
>>> Please use org.apache.hadoop.log.metrics.EventCounter in all the
>>> log4j.properties files.
>>>
>>> (Not sure if hive-server is running!)
>>>
>>> and run  "$ java -cp $CLASSPATH HiveJdbcClient" for hive client from
>>> this https://cwiki.apache.org/confluence/display/Hive/HiveClient.
>>> I've set $CLASSPATH like
>>> (export
>>> CLASSPATH=$CLASSPATH:.:$HIVE_HOME/lib/*:$HADOOP_HOME/hadoop-0.20.2-core.jar)
>>> after doing this "$ java -cp $CLASSPATH HiveJdbcClient", it just stuck
>>> there!!
>>> It should create a table "testHiveDriverTable" in hive, but "show
>>> tables;" on $hive returns no such table.
>>>
>>> Please help.. any1 working with Hive Jdbc, am I missing any
>>> configuration....?
>>>
>>> Regards,
>>> Alok
>>>
>>>
>>
>>
>> --
>> Shashwat Shriparv
>> 09900059620
>> 09663531241
>>
>>
>>
>> <iframe src="
>> http://rcm.amazon.com/e/cm?t=shriparv-20&o=1&p=48&l=ur1&category=kindlerotating&f=ifr"
>> width="728" height="90" scrolling="no" border="0" marginwidth="0"
>> style="border:none;" frameborder="0"></iframe>
>>
>>
>>
>
>
> --
> With Regards
> Vikas Srivastava
>
> DWH & Analytics Team
> Mob:+91 9560885900
> One97 | Let's get talking !
>
>
--
Alok Kumar