简体   繁体   English

Spark - Yarn 客户端模式下应用程序主节点的执行程序数量

[英]Spark - How many executors for application master in Yarn client mode

Question

In Yarn client mode, how many executors are required for the application master (AM)?在 Yarn 客户端模式下,应用主(AM)需要多少个执行器?

In Yarn cluster mode, according to How-to: Tune Your Apache Spark Jobs (Part 2) , the AM requires 2 executors.在 Yarn集群模式下,根据How-to: Tune Your Apache Spark Jobs (Part 2) ,AM 需要 2 个执行程序。

A better option would be to use --num-executors 17 --executor-cores 5 --executor-memory 19G.更好的选择是使用 --num-executors 17 --executor-cores 5 --executor-memory 19G。 Why?为什么?

This config results in three executors on all nodes except for the one with the AM, which will have two executors.这个配置会在所有节点上产生三个执行器,除了一个带有 AM 的执行器,它将有两个执行器。

Update更新

I misunderstood the article.我误解了这篇文章。 AM is a JVM, so if running 3 JVM (executor) per node, then AM node can run 2 executors. AM 是一个 JVM,所以如果每个节点运行 3 个 JVM(执行器),那么 AM 节点可以运行 2 个执行器。 YARN mode has nothing to do with how many non-executor JVM required for AM process. YARN 模式与 AM 进程需要多少个非执行器 JVM 无关。 Always 1 JVM.始终为 1 个 JVM。

My Guess is that your execution mode (cluster / client) has nothing to do with the AM in terms of impact.我的猜测是您的执行模式(集群/客户端)在影响方面与 AM 无关。 Yarn Application Master always runs on the cluster and is decorrelated from the driver/client (which is the only one impacted by your exec mode) Yarn Application Master 始终在集群上运行,并且与驱动程序/客户端(这是唯一受您的 exec 模式影响的)解除关联

1 - As you can see below Client and App Master are decorelated 1 -正如你在下面看到的那样,客户端和应用程序主是不相关的

在此处输入图片说明

2 - Spark Cluster mode : Driver is executer on a driver node 2 - Spark 集群模式:驱动程序是驱动程序节点上的执行程序

在此处输入图片说明

3 - Spark Client Mode : Driver is executed from the worker/machine where the spark job submission originated from 3 - Spark 客户端模式:驱动程序从产生 Spark 作业提交的工人/机器执行

在此处输入图片说明

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

相关问题 如何控制在yarn-client模式下运行多少个executor? - How to control how many executors to run in yarn-client mode? spark 中的执行者和 yarn 中的 application master 是否做同样的工作? - Does executors in spark nd application master in yarn do the same job? 如何在纱线客户端模式下在远程主节点上提交spark作业? - How to submit a spark job on a remote master node in yarn client mode? Spark Kafka Direct DStream - 如果设置了num-executors,则在yarn-cluster模式下有多少个执行程序和RDD分区? - Spark Kafka Direct DStream - How many executors and RDD partitions in yarn-cluster mode if num-executors is set? 使用 YARN 客户端模式时如何防止 Spark Executor 丢失? - How to prevent Spark Executors from getting Lost when using YARN client mode? 如何以纱线客户端模式编程提交Spark应用程序? - How to programatically submit a spark application in yarn-client mode? 如何在YARN上的客户端模式下从执行程序收集日志输出? - How to collect log output from executors in client mode on YARN? 执行器不匹配(在YARN伪分布式模式下闪烁) - Mismatch in no of Executors(Spark in YARN Pseudo distributed mode) 如何在集群模式下将Spark应用提交到YARN? - How to submit Spark application to YARN in cluster mode? Spark如何在Hadoop YARN上准备执行程序? - How does Spark prepare executors on Hadoop YARN?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM