I use this preliminaries to be able to connect to a PostgreSQL Database. They won't work but I can't find any suggestions for the correct notation.
.libPaths(c(.libPaths(), '/opt/spark-1.6.1-bin-hadoop2.6/R/lib'))
Sys.setenv(SPARK_HOME = '/opt/spark-1.6.1-bin-hadoop2.6')
Sys.setenv(PATH = paste(Sys.getenv(c('PATH')), '/opt/spark-1.6.1-bin-hadoop2.6/bin', sep = ':'))
library(SparkR)
d.csv <- "com.databricks:spark-csv_2.11:1.4.0"
d.pg <- "org.postgresql.Driver:postgresql-9.4:1208"
sc <- sparkR.init(sparkPackages=c(d.csv, d.pg))
I have the JAR file stored under "/opt/spark-1.6.1-bin-hadoop2.6/lib/postgresql-9.4.1208.jar" and additionally yum installed the jdbc on my centos6 machine.
When I try to start this the csv library will be found but the JDBC PostgreSQL driver can't be resolved.
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.postgresql.Driver#postgresql-9.4;1208: not found
::::::::::::::::::::::::::::::::::::::::::::::
Any hint would be great. Thanks a lot.