Skip to content

Commit

Permalink
✏Spark
Browse files Browse the repository at this point in the history
  • Loading branch information
0xcaffebabe committed Aug 29, 2023
1 parent a3a1a28 commit f23b1b6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
Binary file added doc/assets/2023829192817.webp
Binary file not shown.
Binary file added doc/assets/202382919534.webp
Binary file not shown.
8 changes: 8 additions & 0 deletions doc/数据技术/大规模数据处理.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ Iterator:迭代函数,Compute:计算函数 都是用来表示 RDD 怎样
- 转换(Transformation):把一个 RDD 转换成另一个 RDD map、filter、mapPartitions,groupByKey
- 动作(Action):通过计算返回一个结果 collect、reduce、count,countByKey

Spark 的 Shuffle 操作跟 MapReduce 是一样的,其通过生产与消费 Shuffle 中间文件的方式,来完成集群范围内的数据交换

![Shuffle 中间文件](/assets/2023829192817.webp)

### 调度系统

![](/assets/2023828201422.webp)
Expand All @@ -169,6 +173,10 @@ Iterator:迭代函数,Compute:计算函数 都是用来表示 RDD 怎样
4. 对于给定 WorkerOffer,TaskScheduler 结合 TaskSet 中任务的本地性倾向,按照 PROCESS_LOCAL、NODE_LOCAL、RACK_LOCAL 和 ANY 的顺序,依次对 TaskSet 中的任务进行遍历,优先调度本地性倾向要求苛刻的 Task
5. 被选中的 Task 由 TaskScheduler 传递给 SchedulerBackend,再由 SchedulerBackend 分发到 Executors 中的 ExecutorBackend。Executors 接收到 Task 之后,即调用本地线程池来执行分布式任务。

### 存储系统

![](/assets/202382919534.webp)

### SparkSQL

![架构](/assets/20221218152657.webp)
Expand Down

0 comments on commit f23b1b6

Please sign in to comment.