Github user tgravescs commented on a diff in the pull request:
https://github.com/apache/spark/pull/21936#discussion_r207269915
--- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
@@ -571,7 +571,12 @@ class SparkContext(config: SparkConf) extends Logging {
_shutdownHookRef = ShutdownHookManager.addShutdownHook(
ShutdownHookManager.SPARK_CONTEXT_SHUTDOWN_PRIORITY) { () =>
logInfo("Invoking stop() from shutdown hook")
- stop()
+ try {
+ stop()
+ } catch {
+ case e: Throwable =>
+ logWarning("Ignoring Exception while stopping SparkContext", e)
--- End diff --
minor nit, could you add in "while stopping SparkContext from shutdownhook"
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]