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