Skip to content

Commit e1a8505

Browse files
committed
Fixed comment length
1 parent 89f9980 commit e1a8505

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

streaming/src/main/scala/org/apache/spark/streaming/StreamingContext.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)