Try this for installation:
setInternet2(TRUE)
install.packages(c(“RJDBC”))
This is how you can use it (assuming the jars are in your classpath or you provide the full path to them):
drv <- JDBC(“org.apache.hive.jdbc.HiveDriver”, c(“hive-jdbc-0.14.0.2.2.4.2-0002-standalone.jar”,” hadoop-common-2.6.0.2.2.4.2-0002.jar”),identifier.quote=”`”)
conn <- dbConnect(drv, “jdbc:hive2://localhost:10001/mydb”, “hive”, “hive”)
result<-dbGetQuery(conn, “select * from table”)
print(result)