Github user aray commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18306#discussion_r122112073
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala 
---
    @@ -690,6 +690,7 @@ class SparkSession private(
        * @since 2.0.0
        */
       def stop(): Unit = {
    +    streams.stopAllQueries()
    --- End diff --
    
    I did look into that method. It does not work because the [application end 
event is generated]( 
https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/SparkContext.scala#L1897)
 after the [SparkContext stopped flag is set]( 
https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/SparkContext.scala#L1888)
 which prevents the queries from stopping properly. We could add a new event 
type that gets called before stopped flag is set in the close method. Do you 
think that would be an appropriate solution?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to