TaskDescription¶
TaskDescription is a metadata of a Task.
Creating Instance¶
TaskDescription takes the following to be created:
- Task ID
- Task attempt number
- Executor ID
- Task name
- Task index (within the TaskSet)
- Partition ID
- Added files (as
Map[String, Long]) - Added JAR files (as
Map[String, Long]) -
Properties - Resources
- Serialized task (as
ByteBuffer)
TaskDescription is created when:
TaskSetManageris requested to find a task ready for execution (given a resource offer)
Resources¶
TaskDescription is given resources when created.
The resources are either specified when TaskSetManager is requested to resourceOffer (and prepareLaunchingTask) or decoded from bytes.
Text Representation¶
toString uses the taskId and index as follows:
Decoding TaskDescription (from Serialized Format)¶
decode simply decodes (<TaskDescription from the serialized format (ByteBuffer).
Internally, decode...FIXME
decode is used when:
-
CoarseGrainedExecutorBackendis requested to CoarseGrainedExecutorBackend.md#LaunchTask[handle a LaunchTask message] -
Spark on Mesos'
MesosExecutorBackendis requested to spark-on-mesos:spark-executor-backends-MesosExecutorBackend.md#launchTask[launch a task]
Encoding TaskDescription (to Serialized Format)¶
encode simply encodes the TaskDescription to a serialized format (ByteBuffer).
Internally, encode...FIXME
encode is used when:
DriverEndpoint(ofCoarseGrainedSchedulerBackend) is requested to launchTasks
Task Name¶
The name of the task is of the format: