spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrewo...@apache.org
Subject spark git commit: [SPARK-11799][CORE] Make it explicit in executor logs that uncaught e…
Date Thu, 19 Nov 2015 22:51:43 GMT
Repository: spark
Updated Branches:
  refs/heads/master 90d384dcb -> 3bd77b213


[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.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/3bd77b21
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/3bd77b21
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/3bd77b21

Branch: refs/heads/master
Commit: 3bd77b213a9cd177c3ea3c61d37e5098e55f75a5
Parents: 90d384d
Author: Srinivasa Reddy Vundela <vsr@cloudera.com>
Authored: Thu Nov 19 14:51:40 2015 -0800
Committer: Andrew Or <andrew@databricks.com>
Committed: Thu Nov 19 14:51:40 2015 -0800

----------------------------------------------------------------------
 .../org/apache/spark/util/SparkUncaughtExceptionHandler.scala  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/3bd77b21/core/src/main/scala/org/apache/spark/util/SparkUncaughtExceptionHandler.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/util/SparkUncaughtExceptionHandler.scala
b/core/src/main/scala/org/apache/spark/util/SparkUncaughtExceptionHandler.scala
index 7248187..5e32255 100644
--- a/core/src/main/scala/org/apache/spark/util/SparkUncaughtExceptionHandler.scala
+++ b/core/src/main/scala/org/apache/spark/util/SparkUncaughtExceptionHandler.scala
@@ -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.)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org


Mime
View raw message