TaskSet — Set of Missing Tasks (of Stage)

TaskSet is a collection of independent tasks of a single stage (and a stage execution attempt) that are missing (uncomputed), i.e. for which computation results are unavailable (as RDD blocks on BlockManagers on executors).

In other words, a TaskSet represents the missing partitions of a stage that (as tasks) can be run right away based on the data that is already on the cluster, e.g. map output files from previous stages, though they may fail if this data becomes unavailable.

Note
Since the tasks of a TaskSet are only the missing tasks, their number does not necessarily have to be the number of all the tasks of a stage. For a brand new stage (that has never been attempted to compute) their numbers are exactly the same.

TaskSet is created exclusively when DAGScheduler is requested to submit the missing tasks of a stage.

Note
Once submitted for execution (to a TaskScheduler), the execution of the TaskSet is managed by a TaskSetManager that allows for spark.task.maxFailures (default: 1 for Spark on local and 4 for Spark clustered).

TaskSet takes the following to be created:

  • Collection of tasks (Array[Task[_]])

  • Stage ID

  • Stage execution attempt ID

  • Priority (for FIFO scheduling)

  • Key-value properties

TaskSet is uniquely identified by an id that is the stageId followed by the stageAttemptId with the comma (.) in-between.

[stageId].[stageAttemptId]

A textual representation (toString) of TaskSet is TaskSet [id].

TaskSet [stageId].[stageAttemptId]

Task Scheduling Prioritization in FIFO Scheduling

The priority of a TaskSet is exactly the ID of the earliest-created active job that needs the stage (that is given when DAGScheduler is requested to submit the missing tasks of a stage).

Once submitted for execution (to a TaskScheduler), the priority of a TaskSet is the priority of the TaskSetManager (which is a Schedulable) that is used for task prioritization (prioritizing scheduling of tasks) in the FIFO scheduling mode.

results matching ""

    No results matching ""