Skip to content

Commit b0dfa7b

Browse files
Ashwin Shankarmingyukim
authored andcommitted
[SPARK-7451] [YARN] Preemption of executors is counted as failure causing Spark job to fail
Added a check to handle container exit status for the preemption scenario, log an INFO message in such cases and move on. andrewor14 Author: Ashwin Shankar <[email protected]> Closes apache#5993 from ashwinshankar77/SPARK-7451 and squashes the following commits: 90900cf [Ashwin Shankar] Fix log info message cf8b6cf [Ashwin Shankar] Stop counting preemption of executors as failure
1 parent f481877 commit b0dfa7b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,9 @@ private[yarn] class YarnAllocator(
373373
// Hadoop 2.2.X added a ContainerExitStatus we should switch to use
374374
// there are some exit status' we shouldn't necessarily count against us, but for
375375
// now I think its ok as none of the containers are expected to exit
376-
if (completedContainer.getExitStatus == -103) { // vmem limit exceeded
376+
if (completedContainer.getExitStatus == ContainerExitStatus.PREEMPTED) {
377+
logInfo("Container preempted: " + containerId)
378+
} else if (completedContainer.getExitStatus == -103) { // vmem limit exceeded
377379
logWarning(memLimitExceededLogMessage(
378380
completedContainer.getDiagnostics,
379381
VMEM_EXCEEDED_PATTERN))

0 commit comments

Comments
 (0)