TaskDescription is a metadata of a task with the following properties:

  • Task ID

  • Task attempt number

  • Executor ID

  • Task name

  • Task index (within the TaskSet)

  • Added files (as Map[String, Long])

  • Added JAR files (as Map[String, Long])

  • Properties

  • Serialized task (as ByteBuffer)

The name of the task is of the format:

task [taskID] in stage [taskSetID]

TaskDescription is created exclusively when TaskSetManager is requested to find a task ready for execution (given a resource offer).

The textual representation of a TaskDescription is as follows:

TaskDescription(TID=[taskId], index=[index])

Decoding TaskDescription (from Serialized Format)

decode(byteBuffer: ByteBuffer): TaskDescription

decode simply decodes (creates) a TaskDescription from the serialized format (ByteBuffer).

Internally, decode…​FIXME

decode is used when:

Encoding TaskDescription (to Serialized Format)

encode(taskDescription: TaskDescription): ByteBuffer

encode simply encodes the TaskDescription to a serialized format (ByteBuffer).

Internally, encode…​FIXME

encode is used when:

  • DriverEndpoint (of CoarseGrainedSchedulerBackend) is requested to launchTasks

  • Spark on Mesos' MesosFineGrainedSchedulerBackend is requested to createMesosTask