Master Worker Driver Executor(线程池<-->tasks) application
Master:负责管理所有的Worker节点并进行资源分配
Worker:负责管理所有的Executor,并与Master进行通信,默认一个Worker只有一个Executor
Application:一个Application==Driver+若干Executor
Driver:The process running the main() function of the application and creating the SparkContext
Executor:每个Executor持有一个线程池的引用,一个线程对应一个task,一个Application在同一个Worker上最多只能有一个Executor
一个Application的资源调度流程(以yarn为例)
1. Worker启动时回向Master注册自身信息
2. 用户执行 spark submit --deploy ....请求Master启动一个Driver
3. Driver启动后,会向Master请求相应数量的Executors
4. 当Executor成功启动后会向Driver注册,然后Driver会向其分配task并监控其执行进度