Spark源码分析之二:Job的调度模型与运行反馈
在《Spark源码分析之Job提交运行总流程概述》一文中,我们提到了,Job提交与运行的第一阶段Stage划分与提交,可以分为三个阶段: 1、Job的调度模型与运行反馈; 2、Stage划分; 3、Stage提交:对应TaskSet的生成。 今天,我们就结合源码来分析下第一个小阶段:Job的调度模型与运行反馈。 首先由DAGScheduler负责将Job提交到事件队列eventProcessLoop中,等待调度执行。入口方法为DAGScheduler的runJon()方法。代码如下: /** * Run an action job on the given RDD and pass all the results to the resultHandler function as * they arrive. * * @param rdd target RDD to run tasks on * @param func a function to run on each partition of the RDD * @param partitions set...