Hello ,
I am trying to connect R to Hive (kerberos enabled) .. Please let me know if the following is the right approach. If yes, I am running into an issue which is not giving enough information to debug.
Thank you for your help in advance.
hadoop.class.path = list.files(path=c("/usr/hdp/2.6.2.0-205/hadoop"),pattern="jar", full.names=T);
hive.class.path = list.files(path=c("/usr/hdp/current/hive-client/lib"),pattern="jar", full.names=T);
hadoop.lib.path = list.files(path=c("/usr/hdp/current/hive-client/lib"),pattern="jar",full.names=T);
mapred.class.path = list.files(path=c("/usr/hdp/current/hadoop-mapreduce-client/lib"),pattern="jar",full.names=T);
cp = c(hive.class.path,hadoop.lib.path,mapred.class.path,hadoop.class.path)
.jinit(classpath=cp, parameters="-DRJDBC.debug=true")
drv <- JDBC("org.apache.hive.jdbc.HiveDriver","hive-jdbc.jar",identifier.quote="`")
conn <- dbConnect(drv, "jdbc:hive2://myserver.corp.server.com:10000/default;principal=hive/_HOST@CORP.server.COM","","")
Error in .jcall(drv@jdrv, "Ljava/sql/Connection;", "connect", as.character(url)[1], :
java.lang.NoClassDefFoundError: Could not initialize class org.apache.hive.jdbc.HiveConnection
Hello ,
I am trying to connect R to Hive (kerberos enabled) .. Please let me know if the following is the right approach. If yes, I am running into an issue which is not giving enough information to debug.
Thank you for your help in advance.