Skip to content
Snippets Groups Projects
Commit 3bd77b21 authored by Srinivasa Reddy Vundela's avatar Srinivasa Reddy Vundela Committed by Andrew Or
Browse files

[SPARK-11799][CORE] Make it explicit in executor logs that uncaught e…

…xceptions are thrown during executor shutdown

This commit will make sure that when uncaught exceptions are prepended with [Container in shutdown] when JVM is shutting down.

Author: Srinivasa Reddy Vundela <vsr@cloudera.com>

Closes #9809 from vundela/master_11799.
parent 90d384dc
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,11 @@ private[spark] object SparkUncaughtExceptionHandler
override def uncaughtException(thread: Thread, exception: Throwable) {
try {
logError("Uncaught exception in thread " + thread, exception)
// Make it explicit that uncaught exceptions are thrown when container is shutting down.
// It will help users when they analyze the executor logs
val inShutdownMsg = if (ShutdownHookManager.inShutdown()) "[Container in shutdown] " else ""
val errMsg = "Uncaught exception in thread "
logError(inShutdownMsg + errMsg + thread, exception)
// We may have been called from a shutdown hook. If so, we must not call System.exit().
// (If we do, we will deadlock.)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment