1.spark-submit提交Spark Application,与ResourceManager通讯之后申请启动ApplicationMaster;ResourceManager通知NodeManager启动ApplicationMaster;ApplicationMaster启动,ApplicationMaster也就是Driver;
2.ApplicationMaster在启动之后,向ResourceManager申请启动Executor;ResourceManager分配Container,通知NodeManager启动Executor;Executor启动;
3.Executor可能有多个,每个Executor启动成功后都会向Driver也就是ApplicationMaster注册;Driver在等待注册完成之后开始执行main函数,创建SparkContext对象(DagScheduler和TaskScheduler),到Action算子触发一个job;DagScheduler根据宽窄依赖划分stage,TaskScheduler将每个stage划分为taskset,将task分给多个Executor执行;