diff options
author | Michael Allman <michael@videoamp.com> | 2016-01-25 09:51:41 +0000 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-01-25 09:51:41 +0000 |
commit | 4ee8191e57cb823a23ceca17908af86e70354554 (patch) | |
tree | f8195609bea1e215f3a86d6dddead6c8e6ce83d8 /core | |
parent | d8e480521e362bc6bc5d8ebcea9b2d50f72a71b9 (diff) | |
download | spark-4ee8191e57cb823a23ceca17908af86e70354554.tar.gz spark-4ee8191e57cb823a23ceca17908af86e70354554.tar.bz2 spark-4ee8191e57cb823a23ceca17908af86e70354554.zip |
[SPARK-12755][CORE] Stop the event logger before the DAG scheduler
[SPARK-12755][CORE] Stop the event logger before the DAG scheduler to avoid a race condition where the standalone master attempts to build the app's history UI before the event log is stopped.
This contribution is my original work, and I license this work to the Spark project under the project's open source license.
Author: Michael Allman <michael@videoamp.com>
Closes #10700 from mallman/stop_event_logger_first.
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/org/apache/spark/SparkContext.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/src/main/scala/org/apache/spark/SparkContext.scala b/core/src/main/scala/org/apache/spark/SparkContext.scala index d7c605a583..fa8c0f524b 100644 --- a/core/src/main/scala/org/apache/spark/SparkContext.scala +++ b/core/src/main/scala/org/apache/spark/SparkContext.scala @@ -1675,12 +1675,6 @@ class SparkContext(config: SparkConf) extends Logging with ExecutorAllocationCli Utils.tryLogNonFatalError { _executorAllocationManager.foreach(_.stop()) } - if (_dagScheduler != null) { - Utils.tryLogNonFatalError { - _dagScheduler.stop() - } - _dagScheduler = null - } if (_listenerBusStarted) { Utils.tryLogNonFatalError { listenerBus.stop() @@ -1690,6 +1684,12 @@ class SparkContext(config: SparkConf) extends Logging with ExecutorAllocationCli Utils.tryLogNonFatalError { _eventLogger.foreach(_.stop()) } + if (_dagScheduler != null) { + Utils.tryLogNonFatalError { + _dagScheduler.stop() + } + _dagScheduler = null + } if (env != null && _heartbeatReceiver != null) { Utils.tryLogNonFatalError { env.rpcEnv.stop(_heartbeatReceiver) |