|NO.Z.00036|——————————|BigDataEnd|——|Hadoop&Spark.V10|——|Spark.v10|sparkcore|RDD编程高阶&spark原理初探&standalone模式作业提交|

一、Spark原理初探:Standalone模式作业提交
### --- Standalone 模式下有四个重要组成部分,分别是:

~~~     Driver:用户编写的 Spark 应用程序就运行在 Driver 上,由Driver 进程执行
~~~     Master:主要负责资源的调度和分配,并进行集群的监控等职责
~~~     Worker:Worker 运行在集群中的一台服务器上。
~~~     负责管理该节点上的资源,负责启动启动节点上的 Executor
~~~     Executor:一个 Worker 上可以运行多个 Executor,
~~~     Executor通过启动多个线程(task)对 RDD 的分区进行并行计算
### --- SparkContext 中的三大组件:

~~~     DAGScheduler:负责将DAG划分成若干个Stage
~~~     TaskScheduler:将DAGScheduler提交的 Stage(Taskset)进行优先级排序,再将task 发送到 Executor
~~~     SchedulerBackend:定义了许多与Executor事件相关的处理,
~~~     包括:新的executor注册进来的时候记录executor的信息,增加全局的资源量(核数);
~~~     executor更新状态,若任务完成的话,回收core;其他停止executor、remove executor等事件
二、sparkcontext.Driver执行流程
三、standalone模式下作业提交步骤
### --- Standalone模式下作业提交步骤:

~~~     启动应用程序,完成SparkContext的初始化
~~~     Driver向Master注册,申请资源
~~~     Master检查集群资源状况。若集群资源满足,通知Worker启动Executor
~~~     Executor启动后向Driver注册(称为反向注册)
~~~     Driver完成DAG的解析,得到Tasks,然后向Executor发送Task
~~~     Executor 向Driver汇总任务的执行情况
~~~     应用程序执行完毕,回收资源
四、standalone模式下job执行流程

 
 
 
 
 
 
 
 
 

Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
                                                                                                                                                   ——W.S.Landor

 

posted on   yanqi_vip  阅读(20)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· DeepSeek 开源周回顾「GitHub 热点速览」
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示