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 (
Map[String, ResourceInformation]) - Serialized task (as
ByteBuffer)
TaskDescription is created when:
TaskSetManageris requested to find a task ready for execution (given a resource offer)
Text Representation¶
toString: String
toString uses the taskId and index as follows:
TaskDescription(TID=[taskId], index=[index])
Decoding TaskDescription (from Serialized Format)¶
decode(
byteBuffer: ByteBuffer): TaskDescription
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(
taskDescription: TaskDescription): ByteBuffer
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:
task [taskID] in stage [taskSetID]