[英]Does executors in spark nd application master in yarn do the same job?
Does executors in spark nd application master in yarn do the same spark 中的执行者和 yarn 中的 application master 是否做同样的事情
In Spark, there is a Driver
and Executors
.在 Spark 中,有一个Driver
和Executors
。 I'm not gonna go into detail of what driver and executors are but in a one-liner, the driver manages the job flow and schedules tasks, and Executors are worker nodes processes in charge of running individual tasks.我不会 go 详细说明驱动程序和执行程序是什么,但在单行中,驱动程序管理作业流并安排任务,而执行程序是负责运行单个任务的工作节点进程。
YARN is basically a resource manager which allocates memory to compute engines. YARN 基本上是一个资源管理器,它将 memory 分配给计算引擎。 Now, this compute engine can be Spark/Tez/Map-reduce.现在,这个计算引擎可以是 Spark/Tez/Map-reduce。 What you need to understand here is when YARN successfully allocates memory they are called containers
.这里你需要了解的是,当 YARN 成功分配 memory 时,它们被称为containers
。
Now when Spark Job is deployed in YARN, Assuming that YARN has sufficient memory for the spark job to run, Yarn first allocates resources as containers
for Spark Application Master which will have the driver program (in case of cluster mode).现在当在 YARN 中部署 Spark Job 时,假设 YARN 有足够的 memory 来运行 spark 作业,Yarn 首先将资源分配为 Spark Application Master 的containers
,其中将有驱动程序(在集群模式的情况下)。 This Application Master will further requests resources for spark executors which YARN will further allocate as containers.此 Application Master 将进一步请求 YARN 将进一步分配为容器的 spark 执行器的资源。 So spark job will have multiple containers, one for the driver program and n
containers for n
executors.所以spark job会有多个容器,一个是driver program, n
container是n
executor。 So you see in the computing sense
the fundamental difference between spark running in a spark cluster and spark running in YARN is the use of containers.所以从computing sense
,在 spark 集群中运行的 spark 和在 YARN 中运行的 spark 之间的根本区别在于容器的使用。
So executors and application master in YARN run inside containers and do the same thing as spark on spark clusters.因此,YARN 中的执行器和应用程序主机在容器内运行,并在 spark 集群上执行与 spark 相同的操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.