使用Sparklyr在Rstudio中连接Spark时出现问题

时间:2019-03-28 14:16:31

标签: r apache-spark

我正在尝试使用sparklyr软件包通过Rstudio建立与spark的连接,但是却给了我这个错误:

  Failed while connecting to sparklyr to port (8880) for sessionid (40729): Gateway in localhost:8880 did not respond.
    Path: C:\spark\spark-2.0.0-bin-hadoop2.7\bin\spark-submit2.cmd
    Parameters: --driver-memory, 2g, --class, sparklyr.Shell, "C:\Users\Juan Ossa\Documents\R\win-library\3.5\sparklyr\java\sparklyr-2.0-2.11.jar", 8880, 40729
    Log: C:\Users\JUANOS~1\AppData\Local\Temp\RtmpG6SLIz\file40b461315f3b_spark.log


---- Output Log ----
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

---- Error Log ----

我已经尝试使用以下方法来增加最大堆大小:

config[["sparklyr.shell.conf"]] <- "spark.driver.extraJavaOptions=-XX:MaxHeapSize=4g"

但错误仍然出现

这是我的实际代码:

config <- spark_config()
config[["sparklyr.shell.conf"]] <- "spark.driver.extraJavaOptions=-XX:MaxHeapSize=4g"
sc <- spark_connect(master = "local")

如果有帮助,我在这里放了一些sessioninfo(),并且我有一个具有12GB RAM的CPU:

Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=Spanish_Argentina.1252  LC_CTYPE=Spanish_Argentina.1252    LC_MONETARY=Spanish_Argentina.1252
[4] LC_NUMERIC=C                       LC_TIME=Spanish_Argentina.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] sparklyr_1.0.9005

0 个答案:

没有答案