我目前正在尝试在 IBM Cloud 上运行的 Kubernetes 集群上部署 spark 示例 jar。
如果我尝试遵循这些 instructions to deploy spark on a kubernetes cluster ,我无法启动 Spark Pi,因为我总是收到错误消息:
The system cannot find the file specified
输入代码后
bin/spark-submit \
--master k8s://<url of my kubernetes cluster> \
--deploy-mode cluster \
--name spark-pi \
--class org.apache.spark.examples.SparkPi \
--conf spark.executor.instances=5 \
--conf spark.kubernetes.container.image=<spark-image> \
local:///examples/jars/spark-examples_2.11-2.3.0.jar
我在正确的目录中 spark-examples_2.11-2.3.0.jar
examples/jars
中的文件目录。
最佳答案
确保 your.jar
文件存在于容器镜像中。
Instruction告诉它应该在那里:
Finally, notice that in the above example we specify a jar with a specific URI with a scheme of local://. This URI is the location of the example jar that is already in the Docker image.
换句话说,
local://
方案已从 local:///examples/jars/spark-examples_2.11-2.3.0.jar
中删除和路径 /examples/jars/spark-examples_2.11-2.3.0.jar
预计可在容器镜像中使用。
关于apache-spark - 如何将 Spark 应用程序 jar 文件部署到 Kubernetes 集群?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50337296/