当前位置:网站首页>spark资源调度和任务调度
spark资源调度和任务调度
2022-08-02 14:05:00 【boyzwz】
spark架构

术语解释

spark on yarn-client模式资源调度和任务调度

一个action算子触发一个job任务
资源调度
1、client模式,在本地启动Driver程序
2、向RS(ResourceManager)发送请求,启动AM(ApplicationMaster)的资源
3、AM随机选定一个节点启动AM
4、AM向RM申请资源,用于启动executor
5、RM分配一批节点,AM向NM发送命令启动executor
6、executor反向注册给Driver端
任务调度
1、当遇到action算子时,触发一个job,开始执行任务调度
2、DAG Scheduler基于Stage构建DAG有向无环图
3、DAG Scheduler根据宽窄依赖将DAG切分成多个Stage(Stage:由多个并行计算的task组成)
4、将Stage以TaskSet的形式发送给Task Scheduler
5、Task Scheduler将TaskSet中的task发送给executor中执行(会尽量发送到数据所在节点的executor上执行)
spark on yarn-cluster模式即在本地提交Spark Application后,Driver会和AM运行在同一节点上。
- ApplicationMaster的作用:
- 为当前的Application申请资源
- 给NameNode发送消息启动Executor。
注意:ApplicationMaster有launchExecutor和申请资源的功能,并没有作业调度的功能。
但当以yarn-cluster模式执行时,AM有任务调度的作用,因为Driver和AM在同一节点了
spark Stand alone模式
可以查看Spark中Standalone的两种提交模式(Standalone-client模式与Standalone-cluster模式) - 爱码网
边栏推荐
猜你喜欢

MySQL知识总结 (一) 数据类型

Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id ‘c

我理解的学习金字塔

St. Regis Takeaway Notes - Lecture 10 Swagger

初识c语言指针

华为防火墙

Unit 14 Viewsets and Routing

The IDEA of packaged jar package

猜数字游戏,猜错10次关机(srand、rand、time)随机数生成三板斧(详细讲解!不懂问我!)

Unit 13 Mixing in View Base Classes
随机推荐
Unit 10 Continuous Tuning
C语言日记 1“Hello world“
Steps to connect the virtual machine with xshell_establish a network connection between the host and the vm virtual machine
科创知识年度盛会,中国科创者大会8月6日首场开幕!
Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id ‘c
Unit 11 Serializers
存储系统Cache(知识点+例题)
uniapp小程序禁止遮罩弹窗下的页面滚动的完美解决办法
St. Regis Takeaway Notes - Lecture 10 Swagger
spark(standalone,yarn)
drf routing component Routers
C语言初级—数组元素的增删改查
Camera Hal(Hal3)层修改Preview流
MySQL 8.0 新特性
宏定义问题记录day2
MySQL知识总结 (五) 锁
宝塔搭建PESCMS-Ticket开源客服工单系统源码实测
Flask framework in-depth
redis delay queue
MySQL知识总结 (八) InnoDB的MVCC实现机制