Install sparklyr with initialize_connect error

196 Views Asked by At

I'm trying to follow the simple guide on SparklyR, but it throws me errors right at the very beginning. I install SparklyR and a local version of Spark as written in the guide:

library("sparklyr")

spark_install(version="1.6.2")

I then open a connection, and here's where the error occurs:

sc <- spark_connect(master="local")

I get "R code execution error" and the following:

Using Spark: 2.2.0 Error in force(code) : Failed during initialize_connection: java.lang.ExceptionInInitializerError

2

There are 2 best solutions below

0
On BEST ANSWER

Actually the author of Sparklyr answered my question. Since I have both Java 8 and Java 9 installed, which Sparklyr is currently not working with Java 9. so I simply uninstall Java 9, then it works fine.

1
On

"1.6.2" is way old.

Does this work?

spark_install(version="2.2.0")
sc <- spark_connect(master="local", version="2.2.0)