Reply
Highlighted
New Contributor
Posts: 10
Registered: ‎05-29-2014

Connecting RServer and CDH using Hive

Hi guys,

 

I installed a 3 data nodes CDH 5.0.1 cluster, everything is OK in my Cloudera console.

 

I need to connect to my Hive data using R Server rHive package

 

Is anyone has any experience doing that?

 

My rHive connect operator give me an Java class not found and I'm getting mad on this! I think it' a libpath issue, but didn't succeed in finding the good path to add!

 

Here's my jar config on R:

 

hadoop home: /appli/cloudera/parcels/CDH/bin/hadoop-hdfs
	hadoop conf: /etc/hadoop/conf
	hive home: /appli/cloudera/parcels/CDH/lib/hive/bin
	user name: admcap
	user home: /appli/admcap
	temp dir: /tmp/admcap
	classpath:
		/usr/lib64/R/library/RHive/java/rhive_udf.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/asm-3.2.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/commons-cli-1.2.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/commons-codec-1.4.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/commons-daemon-1.0.13.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/commons-el-1.0.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/commons-io-2.4.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/commons-lang-2.6.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/commons-logging-1.1.3.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/guava-11.0.2.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/jackson-core-asl-1.8.8.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/jackson-mapper-asl-1.8.8.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/jasper-runtime-5.5.23.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/jersey-core-1.9.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/jersey-server-1.9.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/jetty-6.1.26.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/jetty-util-6.1.26.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/jsp-api-2.1.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/jsr305-1.3.9.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/log4j-1.2.17.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/netty-3.6.2.Final.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/protobuf-java-2.5.0.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/servlet-api-2.5.jar 
		/appli/cloudera/parcels/CDH/lib/hadoop-hdfs/lib/xmlenc-0.52.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/ST4-4.0.4.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/ant-1.9.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/ant-launcher-1.9.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/antlr-2.7.7.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/antlr-runtime-3.4.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/avro.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/bonecp-0.7.1.RELEASE.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/commons-beanutils-1.7.0.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/commons-cli-1.2.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/commons-codec-1.4.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/commons-collections-3.2.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/commons-compress-1.4.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/commons-httpclient-3.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/commons-io-2.4.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/commons-lang-2.4.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/commons-lang-2.6.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/commons-logging-1.1.3.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/datanucleus-api-jdo-3.2.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/datanucleus-core-3.2.2.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/datanucleus-rdbms-3.2.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/derby-10.4.2.0.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/groovy-all-2.1.6.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/guava-11.0.2.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hamcrest-core-1.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hbase-client.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hbase-common.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hbase-hadoop-compat.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hbase-hadoop2-compat.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hbase-protocol.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hbase-server.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-ant-0.12.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-ant.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-beeline-0.12.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-beeline.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-cli-0.12.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-cli.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-common-0.12.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-common.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-contrib-0.12.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-contrib.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-exec-0.12.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-exec.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-hbase-handler-0.12.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-hbase-handler.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-hwi-0.12.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-hwi.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-jdbc-0.12.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-jdbc.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-metastore-0.12.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-metastore.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-serde-0.12.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-serde.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-service-0.12.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-service.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-shims-0.12.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-shims-0.23-0.12.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-shims-common-0.12.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-shims-common-secure-0.12.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-shims-common-secure.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-shims-common.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-shims.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-testutils-0.12.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/hive-testutils.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/htrace-core.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/httpclient-4.2.5.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/httpcore-4.2.5.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/jdo-api-3.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/jetty-6.1.26.cloudera.2.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/jetty-util-6.1.26.cloudera.2.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/jline-0.9.94.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/jsr305-1.3.9.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/jta-1.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/junit-4.10.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/libfb303-0.9.0.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/libthrift-0.9.0.cloudera.2.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/log4j-1.2.16.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/oro-2.0.8.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/paranamer-2.3.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/parquet-hadoop-bundle.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/sentry-binding-hive-1.2.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/sentry-binding-solr-1.2.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/sentry-core-common-1.2.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/sentry-core-model-db-1.2.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/sentry-core-model-search-1.2.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/sentry-policy-common-1.2.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/sentry-policy-db-1.2.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/sentry-policy-search-1.2.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/sentry-provider-common-1.2.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/sentry-provider-file-1.2.0-cdh5.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/servlet-api-2.5-20081211.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/shiro-core-1.2.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/slf4j-api-1.7.5.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/snappy-java-1.0.4.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/stax-api-1.0.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/stringtemplate-3.2.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/tempus-fugit-1.1.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/velocity-1.5.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/xz-1.0.jar 
		/appli/cloudera/parcels/CDH/lib/hive/lib/zookeeper.jar 
		/etc/hadoop/conf
> rhive.connect(host="sd061572-app-01", port=10000, user="<user>", password="<Password>")Error: java.lang.ClassNotFoundException
Posts: 1,824
Kudos: 406
Solutions: 292
Registered: ‎07-31-2013

Re: Connecting RServer and CDH using Hive

It is unclear from the error which class it found amiss.

But try to also add /appli/cloudera/parcels/CDH/lib/hadoop/client/* and /appli/cloudera/parcels/CDH/lib/hadoop/client/lib/* jars to your classpath to make sure its not some common library (such as hadoop-common) that is missing.
Announcements