Skip to content

Commit 806c932

Browse files
committed
Log the user class exception
1 parent 8cd1692 commit 806c932

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,11 +486,10 @@ private[spark] class ApplicationMaster(
486486
case _: InterruptedException =>
487487
// Reporter thread can interrupt to stop user class
488488
case cause: Throwable =>
489+
logError("User class threw exception: " + cause.getMessage, cause)
489490
finish(FinalApplicationStatus.FAILED,
490491
ApplicationMaster.EXIT_EXCEPTION_USER_CLASS,
491492
"User class threw exception: " + cause.getMessage)
492-
// re-throw to get it logged
493-
throw cause
494493
}
495494
}
496495
}

0 commit comments

Comments
 (0)