hadoop - JDBC Connection to Hive version 0.14.0 and from R via RDBC package -
i having hiveserver running on machine1
following code have used jdbc connection
hive_jars <- list.files("/home/jar/hive_jdbc_jar/",                 pattern = "[.]jar", full.names=false, recursive=true)  lib_dir <- "/home/jar/hive_jdbc_jar/"  hive_class_path <- sprintf( '%s/%s', lib_dir, hive_jars )  .jinit(classpath=hive_class_path, parameters="-drjava.debug=true")  hostname <- "10.140.224.64" port <- "10000" drv <- jdbc( 'org.apache.hadoop.hive.jdbc.hivedriver',  classpath= hive_class_path, "`" ) server <- sprintf( 'jdbc:hive://%s:%s/default', hostname, port ) hiveconnection <- dbconnect( drv, server ) error getting
error in .jcall(drv@jdrv, "ljava/sql/connection;", "connect",    as.character(url)[1],  :  java.lang.noclassdeffounderror: not initialize class org.apache.hadoop.hive.conf.hiveconf$confvars jars have added
  "antlr-2.7.7.jar"    "antlr-runtime-3.4.jar"           "commons-logging-1.1.3.jar"         "derby-10.10.1.1.jar"             "hadoop-common-2.4.1.jar"         "hive-exec-0.14.0.jar"             "hive-jdbc-0.14.0-standalone.jar" "hive-jdbc-0.14.0.jar"            "hive-metastore-0.14.0.jar"       "hive-service-0.14.0.jar"         "jdo-api-3.0.1.jar"               "libfb303-0.9.0.jar"              "libthrift-0.9.0.jar"             "log4j-1.2.16.jar"                "slf4j-api-1.7.5.jar"             "slf4j-log4j12-1.7.5.jar"  
 
  
Comments
Post a Comment