Spark Application提交运行时部署模式Deploy Mode,==表示的是Driver Program运行的地方,要么是提交应用的Client:client,要么是集群中从节点(Standalone:Worker,YARN: NodeManager):cluster。
--deploy-mode DEPLOY_MODE
Whether to launch the driver program locally ("client") or on one of the worker machines inside the cluster ("cluster")(Default: client).
默认值为client,当时在实际项目中,尤其在生产环境,使用cluster部署模式提交应用运行。
1. 两种模式区别
Cluster和Client模式最最本质的区别是:Driver程序运行在哪里。
1.1 client 模式
此种模式:
1)Driver 在本地运行
2)Executor 在集群的Worker节点上运行
以Spark Application运行到Standalone集群上为例,前面提交运行圆周率PI或者词频统计 WordCount程序时,默认DeployMode为Client,表示应用Driver Program运行在提交应用Client 主机上(启动JVM Process进程),示意图如下:
本文详细介绍了Spark Application的两种部署模式——Client和Cluster模式,重点讨论了它们的区别,以及在YARN上的运行方式。在生产环境中,推荐使用Cluster模式,而Client模式则常用于开发和测试。文中还提到了Driver Program和Executor的执行位置,以及在不同模式下对应用程序运行结果的影响。
订阅专栏 解锁全文
1938

被折叠的 条评论
为什么被折叠?



