apache-spark - 如何将 Spark 应用程序 jar 文件部署到 Kubernetes 集群?

标签 apache-spark kubernetes

我目前正在尝试在 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/

相关文章:

dataframe - pySpark - 在滚动窗口中获取最大值行

Kubernetes pod 无法解析外部主机名

kubernetes - 是否可以安排 CronJob 在每个 Kubernetes 节点上执行?

kubernetes - 使用外部 Prometheus 抓取 CoreDNS 指标

apache-spark - Spark 作业失败 : storage. DiskBlockObjectWriter:恢复部分写入文件时未捕获的异常

java - Spark Streaming 中的 Kafka 消费者

apache-spark - AWS EMR 上的 Spark UI

apache-spark - 如何使 Spark 驱动程序对 Master 重启具有弹性?

kubernetes - 在Kubernetes中创建redis sentinel集群,redis master无法获取slave origin IP

jenkins - 让 jenkins 在不同节点池中的 gke 上生成代理