HeartSaVioR commented on a change in pull request #23912: [SPARK-21029][SS] 
StreamingQuery should be stopped when the SparkSession is stopped
URL: https://github.com/apache/spark/pull/23912#discussion_r264127362
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/SparkContext.scala
 ##########
 @@ -83,6 +84,7 @@ class SparkContext(config: SparkConf) extends Logging {
 
   val startTime = System.currentTimeMillis()
 
+  private[spark] val stopping: AtomicBoolean = new AtomicBoolean(false)
 
 Review comment:
   Just 2 cents: not sure about preference, but if we mind about having two 
different fields for dealing with stopping context, we could just define state 
by int - 0 (no-request) and 1 (stop-in-progress) and 2 (stopped) - and leverage 
one AtomicInteger.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to