[{"createTime":1735734952000,"id":1,"img":"hwy_ms_500_252.jpeg","link":"https://activity.huaweicloud.com/cps.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905","name":"华为云秒杀","status":9,"txt":"华为云38元秒杀","type":1,"updateTime":1735747411000,"userId":3},{"createTime":1736173885000,"id":2,"img":"txy_480_300.png","link":"https://cloud.tencent.com/act/cps/redirect?redirect=1077&cps_key=edb15096bfff75effaaa8c8bb66138bd&from=console","name":"腾讯云秒杀","status":9,"txt":"腾讯云限量秒杀","type":1,"updateTime":1736173885000,"userId":3},{"createTime":1736177492000,"id":3,"img":"aly_251_140.png","link":"https://www.aliyun.com/minisite/goods?userCode=pwp8kmv3","memo":"","name":"阿里云","status":9,"txt":"阿里云2折起","type":1,"updateTime":1736177492000,"userId":3},{"createTime":1735660800000,"id":4,"img":"vultr_560_300.png","link":"https://www.vultr.com/?ref=9603742-8H","name":"Vultr","status":9,"txt":"Vultr送$100","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":5,"img":"jdy_663_320.jpg","link":"https://3.cn/2ay1-e5t","name":"京东云","status":9,"txt":"京东云特惠专区","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":6,"img":"new_ads.png","link":"https://www.iodraw.com/ads","name":"发布广告","status":9,"txt":"发布广告","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":7,"img":"yun_910_50.png","link":"https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=aXhpYW95YW5nOA===&utm_medium=cps&utm_campaign=201905","name":"底部","status":9,"txt":"高性能云服务器2折起","type":2,"updateTime":1735660800000,"userId":3}]
yarn:资源调度和任务管理
a、四大组件:(四个进程)
ResourceManager(Rm):主进程
Nodemanager(NM):各个机器节点管理器
ApplicationMaster(AM):申请资源
Container容器:处理各个节点分布式作业的
YARN架构介绍:
YARN执行流程:
1、client连接RM提交作业,RM给client一个JobId(ApplicationManager和ResourceScheduler)
2、RM中的ApplicationManager连接一个NM,让NM创建一个AM处理客户端作业请求
3、AM连接RM中的ApplicationManager申请Nodemanager,
4、AM连接ResourceScheduler去给client的作业申请资源(cpu、内存、磁盘、网络)
5、AM连接NM,发送client job作业程序和申请的资源cpu、内存、磁盘、网络
6、NM启动Container进程运行job的不同任务
7、Container进程运行状态实时反馈给AM
8、AM反馈任务状态信息给RM中的ApplicationManager
9、client端可以连接RM或AM查询job的执行情况
注:NM启动后去RM上进行注册,会不断发送心跳,说明存活状态
四大组件的作用:
ResourceManager:
1、处理客户端请求
2、启动/监控ApplicationMaster
3、监控NodeManager
4、资源分配与调度
APPlicationMaster:
1、程序切分
2、为应用程序申请资源,并分配任务
3、任务监控与容错
NodeManager:
1、单个节点上资源管理
2、处理来自ResourceManager的命令
3、处理来自ApplicationMaster的命令
Container:
对任务运行环境的抽象,封装了CPU、内存等多维资源以及环境变量、启动命令等任务运行相关信息’