spark中的驱动程序和应用程序管理器有什么区别

What is the difference between Driver and Application manager in spark

我无法弄清楚 Spark 驱动程序和应用程序主机之间有什么区别。基本上 运行 应用程序中的职责,谁做什么?

在客户端模式下,客户端机器有驱动程序,app master 在集群节点之一中运行。在集群模式下,client 没有任何,driver 和 app master 运行在同一个节点(集群节点之一)。

driver和app master具体做了哪些操作?

参考文献:

根据 spark 文档

Spark 驱动程序:

The Driver(aka driver program) is responsible for converting a user application to smaller execution units called tasks and then schedules them to run with a cluster manager on executors. The driver is also responsible for executing the Spark application and returning the status/results to the user.

Spark Driver contains various components – DAGScheduler, TaskScheduler, BackendScheduler and BlockManager. They are responsible for the translation of user code into actual Spark jobs executed on the cluster.

Application Master 在哪里

The Application Master is responsible for the execution of a single application. It asks for containers from the Resource Scheduler (Resource Manager) and executes specific programs on the obtained containers. Application Master is just a broker that negotiates resources with the Resource Manager and then after getting some container it make sure to launch tasks(which are picked from scheduler queue) on containers.

简而言之,驱动程序会将您的自定义逻辑转换为阶段、作业和任务。您的应用程序主管将确保从 RM 获得足够的资源,并确保检查您的任务状态 运行装在容器中。

在您提供的参考资料中已经说过,客户端模式和集群模式之间的唯一区别是

在客户端中,模式 驱动程序 将在我们有 executed/run 火花 application/job 和 AM 运行 的机器上 运行 s 在集群节点之一中。

(与)

在 application master 中的集群模式驱动程序 运行 中,这意味着应用程序有更多的责任。

参考资料:

https://luminousmen.com/post/spark-anatomy-of-spark-application#:~:text=The%20Driver(aka%20driver%20program,status%2Fresults%20to%20the%20user.

https://www.edureka.co/community/1043/difference-between-application-master-application-manager#:~:text=The%20Application%20Master%20is%20responsible,class)%20on%20the%20obtained%20containers.