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

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group