You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2022/05/18 06:19:00 UTC
[jira] [Created] (SPARK-39218) Python foreachBatch streaming query cannot be stopped gracefully after pin thread mode is enabled
Hyukjin Kwon created SPARK-39218:
------------------------------------
Summary: Python foreachBatch streaming query cannot be stopped gracefully after pin thread mode is enabled
Key: SPARK-39218
URL: https://issues.apache.org/jira/browse/SPARK-39218
Project: Spark
Issue Type: Bug
Components: PySpark, Structured Streaming
Affects Versions: 3.2.1
Reporter: Hyukjin Kwon
For example,
{code}
import time
def func(batch_df, batch_id):
time.sleep(10)
print(batch_df.count())
q = spark.readStream.format("rate").load().writeStream.foreachBatch(func).start()
time.sleep(5)
q.stop()
{code}
works find with pinned thread mode is disabled. Whe pinned thread mode is enabled:
{code}
{code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org