Task Failure, Preemption, and Retry in a Batch Job

Task Failure, Preemption, and Retry in a Batch Job A sequence diagram generated by Archify. submit job — N tasks + request metadata job id, CPU / RAM / disk, GPU need, credentials, params, code location allocate tasks — data locality preferred allocate remaining tasks MapReduce: intermediate written to DFS task waits for the write: fault-tolerant, heavy I/O Spark: intermediate in memory, spill to disk only the final result reaches DFS; loss recovered from lineage Flink: periodic checkpoint snapshot task state snapshotted to durable storage heartbeats stop — crash, network cut, or preemption preemption: spot capacity reclaimed or a higher-priority job arrives task declared incomplete — partial output deleted reschedule the task — retry at task level immutable input, no side effects: re-running is safe recompute from immutable input; write output replacement task complete publish job output — all-or-nothing 1 · Job submission and task allocation 2 · Intermediate data strategies 3 · Failure, task-level retry, all-or-nothing commit Job Client · workflow scheduler · Sequence participant Job Client workflow scheduler Resource Manager · task scheduler + cluster state · Sequence participant Resource Manager task scheduler + cluster state Executor A · Node 1 · Sequence participant Executor A Node 1 Executor B · Node 2 · Sequence participant Executor B Node 2 Distributed FS · object store + intermediate data · Sequence participant Distributed FS object store + intermediate data Legend main request return async trace message