Skip to content

Commit a5a7d7f

Browse files
committed
Fix for SparkContext stop behavior
1 parent 9193a0c commit a5a7d7f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/main/scala/org/apache/spark/SparkEnv.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,10 @@ class SparkEnv (
107107
outputCommitCoordinator.stop()
108108
rpcEnv.shutdown()
109109
} catch {
110-
case NonFatal(e) =>
110+
case e: ServerStateException =>
111111
logInfo("Exception while SparkEnv stop", e)
112+
case NonFatal(e) =>
113+
throw e;
112114
}
113115

114116
// Unfortunately Akka's awaitTermination doesn't actually wait for the Netty server to shut

0 commit comments

Comments
 (0)