Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive >> mail # user >> Connecting to Hive from R through JDBC


+
Saurabh S 2013-05-07, 18:55
+
Sanjay Subramanian 2013-05-08, 00:27
+
Saurabh S 2013-05-08, 17:28
Copy link to this message
-
Re: Connecting to Hive from R through JDBC
Saurabh

Can u please try to install squirrel and point to hive jdbc jar and see if u can connect to Hive thru Squirrel client….It will just check if u can connect using another client

Thanks
sanjay
From: Saurabh S <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Reply-To: "[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>" <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Date: Wednesday, May 8, 2013 10:28 AM
To: "[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>" <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Subject: RE: Connecting to Hive from R through JDBC

Thanks for the reply, Sanjay.

The Hive server is definitely running. I had once connected Hive from within Python, so it's not a server issue.

It looks more like java libraries issue on my local machine, but I can't figure out what's wrong.

________________________________
From: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>
Subject: Re: Connecting to Hive from R through JDBC
Date: Wed, 8 May 2013 00:27:35 +0000

Hi Saurabh

The usual suspect looks like hive-server service is not running on server where hive is installed….The hive-server service needs to be installed and started….It listens on port 10000 by default.

Also on a side note is I hope your Hive connecting to MySQL or some non-derby RDBMS :-)

Thanks
sanjay

From: Saurabh S <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Reply-To: "[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>" <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Date: Tuesday, May 7, 2013 11:55 AM
To: "[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>" <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Subject: Connecting to Hive from R through JDBC

Hi,

I'm trying to use package RJDBC to connect to hive through R. My client machine, on which R is installed, is Windows 7. I installed the package, then copied the file hive-jdbc-0.9.0-cdh4.1.2.jar to my local R work folder. Then used the following commands:

I was able to read the driver through following command:

drv <- JDBC('org.apache.hadoop.hive.jdbc.HiveDriver', 'C:/Users/Saurabh/Documents/RWork/hive-jdbc-0.9.0-cdh4.1.2.jar')
But when I try to make the connection using the following command:

conn <- dbConnect(drv, 'jdbc:hive://<hostname>:<port>/default')
I get the following error:

java.lang.NoClassDefFoundError: org/apache/hadoop/hive/metastore/api/MetaException
Any idea why this is happening? Some say that it's best to have R and Hive on the same server so that you can just pass localhost in the dbConnect command. But that's not an option for me because even if R is installed on the Hadoop server, RJDBC isn't available and I'm just a local user.
Thanks,

Saurabh
CONFIDENTIALITY NOTICE
=====================This email message and any attachments are for the exclusive use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message along with any attachments, from your computer system. If you are the intended recipient, please be advised that the content of this message is subject to access, review and disclosure by the sender's Email System Administrator.

CONFIDENTIALITY NOTICE
=====================This email message and any attachments are for the exclusive use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message along with any attachments, from your computer system. If you are the intended recipient, please be advised that the content of this message is subject to access, review and disclosure by the sender's Email System Administrator.
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB