将Sparkly连接到HDP-Sandbox Spark实例

时间:2019-06-15 18:44:01

标签: r apache-spark sparklyr livy hdp

我想将R实例连接到运行在一台本地计算机上Docker上部署的HDP-Sandbox上的Spark。该错误消息表示对--version的{​​{1}}调用失败。

R实例

spark-submit
  

packageVersion("sparklyr") # [1] ‘1.0.1’ # Set old JAVA version Sys.setenv("JAVA_HOME" = "/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home") library(sparklyr) sc <- spark_connect( master = " http://localhost:4040", spark_home = "/usr/hdp/current/spark2-client", app_name = "RStudio", method = "shell" ) 中的错误:运行命令时发生错误

HDP

system2(file.path(spark_home, "bin", "spark-submit"),
  "--version",

更新

我求助于Livy,因为它似乎是一个更简单的解决方案。我已经打开[root@sandbox-hdp ~]# /usr/hdp/current/spark2-client/bin/spark-submit --version Welcome to ____ __ / __/__ ___ _____/ /__ _\ \/ _ \/ _ `/ __/ '_/ /___/ .__/\_,_/_/ /_/\_\ version 2.3.1.3.0.1.0-187 /_/ Using Scala version 2.11.8, OpenJDK 64-Bit Server VM, 1.8.0_191 Branch HEAD Compiled by user jenkins on 2018-09-19T10:10:07Z Revision fe7bed1ca174a6687ebd2aa0f8ba5fb7bf668399 Url git@github.com:hortonworks/spark2.git Type --help for more information. 文件中引用的8999端口,现在可以通过livy.conf访问Livy UI。

Livy Session

尽管如此,在尝试连接时,我仍然不断收到错误消息:

http://localhost:8999/ui

0 个答案:

没有答案