File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
streaming/src/main/scala/org/apache/spark/streaming Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -613,13 +613,12 @@ class StreamingContext private[streaming] (
613613 case STARTED =>
614614 scheduler.stop(stopGracefully)
615615 uiTab.foreach(_.detach())
616- // Even if the streaming context has not been started, we still need to stop the SparkContext.
617- // Even if we have already stopped, we still need to attempt to stop the SparkContext because
618- // a user might stop(stopSparkContext = false) and then call stop(stopSparkContext = true).
619616 StreamingContext .setActiveContext(null )
620- logInfo(" StreamingContext stopped successfully" )
621617 waiter.notifyStop()
618+ logInfo(" StreamingContext stopped successfully" )
622619 }
620+ // Even if we have already stopped, we still need to attempt to stop the SparkContext because
621+ // a user might stop(stopSparkContext = false) and then call stop(stopSparkContext = true).
623622 if (stopSparkContext) sc.stop()
624623 } finally {
625624 // The state should always be Stopped after calling `stop()`, even if we haven't started yet
You can’t perform that action at this time.
0 commit comments