cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now