首页 > 解决方案 > Sparklyr - 无法连接到“本地”

问题描述

尝试使用 sparklyr 连接到 spark 时,我收到以下错误消息:

'Error in spark_connect_gateway(gatewayAddress, gatewayPort, sessionId,  : 
  Gateway in localhost:8880 did not respond.'

控制台中没有显示其他信息。我正在运行 Spark 3.0.0 和 Java 8 RE。

我去寻找 .log 文件并找到了它。这是它包含的内容:

'Cool' is not recognized as an internal or external command,
operable program or batch file.
Failed to find Spark jars directory.
You need to build Spark before running this program.

我的本地帐户名称包含名称中带有空格的“Cool”,因此它可能与我在 PATH 中为 spark_home 设置的文件路径有关。如何在文件路径中包含空格?我尝试了不同的引号组合,但仍然收到相同的错误消息。

R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)

Matrix products: default

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

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

other attached packages:
[1] dplyr_1.0.2    sparklyr_1.4.0 shiny_1.5.0   

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.5        later_1.1.0.1     compiler_4.0.2    pillar_1.4.6      dbplyr_1.4.4      r2d3_0.2.3       
 [7] base64enc_0.1-3   tools_4.0.2       odbc_1.2.3        digest_0.6.25     bit_4.0.4         jsonlite_1.7.1   
[13] evaluate_0.14     tibble_3.0.3      lifecycle_0.2.0   pkgconfig_2.0.3   rlang_0.4.7       DBI_1.1.0        
[19] rstudioapi_0.11   parallel_4.0.2    yaml_2.2.1        xfun_0.17         fastmap_1.0.1     withr_2.3.0      
[25] httr_1.4.2        knitr_1.30        askpass_1.1       rappdirs_0.3.1    generics_0.0.2    vctrs_0.3.4      
[31] htmlwidgets_1.5.1 hms_0.5.3         bit64_4.0.5       rprojroot_1.3-2   tidyselect_1.1.0  glue_1.4.2       
[37] forge_0.2.0       R6_2.4.1          rmarkdown_2.3     tidyr_1.1.2       purrr_0.3.4       blob_1.2.1       
[43] magrittr_1.5      promises_1.1.1    backports_1.1.10  htmltools_0.5.0   ellipsis_0.3.1    assertthat_0.2.1 
[49] xtable_1.8-4      mime_0.9          httpuv_1.5.4      config_0.3        tinytex_0.26      openssl_1.4.3

标签: rapache-sparkhadoopsparklyr

解决方案


推荐阅读