cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

spark.apache.org

Sandeep
Contributor III

Per API docs on StreamingQuery.stop(),

https://spark.apache.org/docs/latest/api/scala/org/apache/spark/sql/streaming/StreamingQuery.html

It says, this stops the execution of this query if it is running and waits until the termination of the query execution threads or until a timeout is hit.

This doesn't mean it waits for micro-batch completion. It will interrupt all active threads but wait until the termination or completion if it couldn't interrupt the current "thread" running. Sometimes we use uninterruptible threads, e.g. with Kafka - because interrupting Kafka threads bricks the cluster. All other threads will be interrupted.

0 REPLIES 0
Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.