arunmahadevan opened a new pull request #23912: [SPARK-21029][SS] 
StreamingQuery should be stopped when the SparkSession is stopped
URL: https://github.com/apache/spark/pull/23912
 
 
   ## What changes were proposed in this pull request?
   
   This patch proposes to stop the underlying streaming queries when a spark 
session is stopped.
   
   Without this, the streaming query continues to run and fails with exception 
during the next trigger.
   
   For E.g.
   
   val lines = spark.readStream.format("socket").option("host", 
"localhost").option("port", "9999").load()
   lines.writeStream.format("console").start
   ...
   > send some input
   ...
   spark.stop
   ...
   > send more input
   ...
   The job fails with below exception
   
   ## How was this patch tested?
   
   Tested manually. Would add unit tests once I receive feedback on the 
approach.
   
   Please review http://spark.apache.org/contributing.html before opening a 
pull request.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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