简体   繁体   English

使用 Kubernetes、Python 和 Apache-Spark 3.2.0 在客户端模式下运行 spark 的两个单独图像?

[英]Two separate images to run spark in client-mode using Kubernetes, Python with Apache-Spark 3.2.0?

I deployed Apache Spark 3.2.0 using this script run from a distribution folder for Python:我使用从 Python 的分发文件夹运行的脚本部署了 Apache Spark 3.2.0:

./bin/docker-image-tool.sh -r <repo> -t my-tag -p ./kubernetes/dockerfiles/spark/bindings/python/Dockerfile build

I can create a container under K8s using Spark-Submit just fine.我可以使用 Spark-Submit 在 K8s 下创建一个容器就好了。 My goal is to run spark-submit configured for client mode vs. local mode and expect additional containers will be created for the executors.我的目标是运行为客户端模式与本地模式配置的 spark-submit,并期望为执行程序创建额外的容器。

Does the image I created allow for this, or do I need to create a second image (without the -p option) using the docker-image tool and configure within a different container ?我创建的图像是否允许这样做,或者我是否需要使用 docker-image 工具创建第二个图像(没有 -p 选项)并在不同的容器中进行配置?

It turns out that only one image is needed if you're running PySpark.事实证明,如果您正在运行 PySpark,则只需要一张图片。 Using Client-mode, the code spawns the executors and workers for you and they run once you create a spark-submit command.使用客户端模式,代码会为您生成执行程序和工作程序,一旦您创建了 spark-submit 命令,它们就会运行。 Big improvement from Spark version 2.4! Spark 2.4 版的重大改进!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM