4

After installing sparklyr package I followed the instruction here ( http://spark.rstudio.com/ ) to connect to spark. But faced with this error. Am I doing something wrong. Please help me.

 sc = spark_connect( master = 'local' )

Error in file(con, "r") : cannot open the connection In addition: Warning message: In file(con, "r") : cannot open file 'C:\Users\USER\AppData\Local\Temp\RtmpYb3dq4\fileff47b3411ae_spark.log': Permission denied

But I am able to find the file at the stated location. And on opening, I found it to be empty.I

Keshav Pradeep Ramanath
  • 1,623
  • 4
  • 24
  • 33
boral
  • 131
  • 9

2 Answers2

1

First of all, did you install sparklyr from github devtools::install_github("rstudio/sparklyr") or CRAN? There were some issues some time ago with Windows installations.

The issue you have seems to be related to TEMP and TMP folder level permission on Windows or to file creation permission. Every time you start sc <- spark_connect(), it tries to create a folder and file to write the log files. Make sure you have a write access to these locations.

michalrudko
  • 1,432
  • 2
  • 16
  • 30
0

I could observe the same error message with version 2.4.3 and 2.4.4 in different cases:

When trying to connect to a non "local" master, using spark_connect(master="spark://192.168.0.12:7077", ..),

  • if the master is not started or not responding at the specified master url.
  • when setting a specific incomplete configuration
    • in my case trying to set dynamicAllocation to true, without other required dynamicAllocation settings:

conf <- spark_config() conf$spark.dynamicAllocation.enabled <- "true"

user1767316
  • 3,276
  • 3
  • 37
  • 46