sparklyr troubles connecting

I have spark running on one of my computers and I want to connect to it from R studio (i'm very new to spark):

I tried a couple of different things:

# Load sparklyr
library(sparklyr)

# Connect to your Spark cluster
spark_conn <- spark_connect(master ="spark://ignacio-XPS-8930:7077")
#> Error in shell_connection(master = master, spark_home = spark_home, app_name = app_name, : Failed to connect to Spark (SPARK_HOME is not set).

Created on 2019-02-20 by the reprex package (v0.2.1)

# Load sparklyr
library(sparklyr)

# Connect to your Spark cluster
spark_conn <- spark_connect(master ="spark://ignacio-XPS-8930:7077", spark_home = "spark://ignacio-XPS-8930:7077")
#> Error in system2(file.path(spark_home, "bin", "spark-submit"), "--version", : error in running command

Created on 2019-02-20 by the reprex package (v0.2.1)

What am I doing wrong?

I was able to figure this one out (not sure if there is a better way of doing this)

spark_conn <- spark_connect(master ="spark://ignacio-XPS-8930:7077",
                            spark_home = "/usr/local/spark-2.4.0-bin-hadoop2.7")

works

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.