我正在尝试连接到运行在kubernetes上的spark(在客户端模式下),并且每次都会出现此错误:
start_shell中的错误(master = master,spark_home = spark_home,spark_version =版本,: 找不到SPARK_HOME目录'/ opt / spark / bin /'
但是,当我尝试从python连接并进入Pod时,我可以看到/ opt / spark / bin目录具有必要的spark-submit等
关于我可能会缺少的任何建议吗?
谢谢!
代码:
library(sparklyr)
conf <- spark_config()
conf$spark.submit.deployMode = "client"
conf$spark.kubernetes.namespace = "spark-project1"
conf$spark.driver.host = "192.168.1.1:5000"
conf$spark.driver.port = 7787
conf$spark.kubernetes.container.image = "192.168.1.1:5000/spark/spark-r:v2.4.1"
conf$spark.executor.instances = 2
conf$spark.kubernetes.driver.request.cores = 32
conf$spark.kubernetes.driver.limit.cores = 32
conf$spark.kubernetes.executor.request.cores = 12
conf$spark.kubernetes.executor.limit.cores = 13
conf$spark.executor.core = 12
conf$spark.executor.memory = "20G"
conf$spark.kubernetes.authenticate.driver.serviceAccountName = "spark"
sc<- spark_connect(master ="k8s://https://192.168.1.1:6443",
spark_home = "/opt/spark/bin/",
version = "2.4.1",
config = conf)