当前位置:网站首页>09 Spark on RDD 阶段划分
09 Spark on RDD 阶段划分
2022-08-08 23:31:00 【YaPengLi.】
DAG(Directed Acyclic Graph)有向无环图是由点和线组成的拓扑图形,该图形具有方向,不会闭环。例如,DAG 记录了 RDD 的转换过程和任务的阶段。
Application:初始化一个 SparkContext 即生成一个 Application;
Job:一个 Action 算子就会生成一个 Job;
Stage:Stage 等于宽依赖(ShuffleDependency)的个数加 1;
Task:一个 Stage 阶段中,最后一个 RDD 的分区个数就是 Task 的个数。
val tasks: Seq[Task[_]] = try {
stage match {
case stage: ShuffleMapStage =>
partitionsToCompute.map { id =>
val locs = taskIdToLocations(id)
val part = stage.rdd.partitions(id)
new ShuffleMapTask(stage.id, stage.latestInfo.attemptId,
taskBinary, part, locs, stage.latestInfo.taskMetrics, properties,
Option(jobId),
Option(sc.applicationId), sc.applicationAttemptId)
}
case stage: ResultStage =>
partitionsToCompute.map { id =>
val p: Int = stage.partitions(id)
val part = stage.rdd.partitions(p)
val locs = taskIdToLocations(id)
new ResultTask(stage.id, stage.latestInfo.attemptId,
taskBinary, part, locs, id, properties, stage.latestInfo.taskMetrics,
Option(jobId), Option(sc.applicationId), sc.applicationAttemptId)
}
}
边栏推荐
- makefile automatically compiles C files in directories and subdirectories
- 如何在Android中使用Realm数据库
- JS中的预编译(AO、GO详解)
- (2022牛客多校四)A-Task Computing (排序+动态规划)
- 2022杭电多校五 C - Slipper (dijkstra+虚拟结点)
- (2022牛客多校五)H-Cutting Papers(签到)
- 跨域请求浏览器无法显示set-cookie,坑了我一晚上
- STM8L 液晶数码管驱动,温度计液晶屏显示
- WeChat applet develops some function usage methods
- 机器学习建模高级用法!构建企业级AI建模流水线
猜你喜欢
域前置通信过程和溯源思路
跨域请求浏览器无法显示set-cookie,坑了我一晚上
(2022牛客多校五)H-Cutting Papers(签到)
2022杭电多校六 1009-Map (巴那赫不动点)
(2022牛客多校四)K-NIO‘s Sword(思维)
(2022牛客多校四)D-Jobs (Easy Version)(三维前缀或)
Learning experience of bp neural network
使用Mongoose populate实现多表关联存储与查询,内附完整代码
最详树莓派4B装机流程及ifconfig不到wlan0的解决办法
(2022牛客多校四)H-Wall Builder II(思维)
随机推荐
Free ARP
【Tensorflow2】tensorflow1.x-tensorflow2.x一些接口的转变
[PP-YOLOv2] Training a custom dataset
Button Wizard Delete File Command
51nod1798 打怪兽
【Verilog基础】PPA优化问题总结(含面积优化、速度优化)
Kubernetes 实现 CI/CD 发布流程
用工具实现 Mock API 的整个流程
【Verilog基础】关于芯片中信号串扰的理解
-Wl,--start-group ... -Wl,--end-group for resolving circular dependencies of several libraries
Use Mongoose populate to implement multi-table associative storage and query, with complete code included
【YOLOv5】6.0环境搭建(不定时更新)
Tp5 in cache cache, storage cell phone text message authentication code
Porting ucos2 code from stm32 to GD32
Share | design based on MCU P0 mouth to drive the LED flashing
可以在易方达基金上买基金吗,安全吗
【latex异常与错误】There were undefined references.Reference `xxx‘ on page x undefined.参考引用公式编号时发生错误
WeChat applet error undefined Expecting 'STRING','NUMBER','NULL','TRUE','FALSE','{','[', got ]Solution
(2022牛客多校四)D-Jobs (Easy Version)(三维前缀或)
STM8L LCD digital tube driver, thermometer LCD display