Skip to content

Commit 564dbf6

Browse files
asaf400HyukjinKwon
authored andcommitted
[MINOR][DOCS] Fix invalid documentation for StreamingQueryManager Class
## What changes were proposed in this pull request? When following the example for using `spark.streams().awaitAnyTermination()` a valid pyspark code will output the following error: ``` Traceback (most recent call last): File "pyspark_app.py", line 182, in <module> spark.streams().awaitAnyTermination() TypeError: 'StreamingQueryManager' object is not callable ``` Docs URL: https://spark.apache.org/docs/latest/structured-streaming-programming-guide.html#managing-streaming-queries This changes the documentation line to properly call the method under the StreamingQueryManager Class https://spark.apache.org/docs/latest/api/python/pyspark.sql.html#pyspark.sql.streaming.StreamingQueryManager ## How was this patch tested? After changing the syntax, error no longer occurs and pyspark application works This is only docs change Closes #24547 from asaf400/patch-1. Authored-by: Asaf Levy <asaf400@gmail.com> Signed-off-by: HyukjinKwon <gurwls223@apache.org> (cherry picked from commit 09422f5) Signed-off-by: HyukjinKwon <gurwls223@apache.org>
1 parent 8eac465 commit 564dbf6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/structured-streaming-programming-guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2310,11 +2310,11 @@ spark.streams().awaitAnyTermination(); // block until any one of them terminat
23102310
{% highlight python %}
23112311
spark = ... # spark session
23122312

2313-
spark.streams().active # get the list of currently active streaming queries
2313+
spark.streams.active # get the list of currently active streaming queries
23142314

2315-
spark.streams().get(id) # get a query object by its unique id
2315+
spark.streams.get(id) # get a query object by its unique id
23162316

2317-
spark.streams().awaitAnyTermination() # block until any one of them terminates
2317+
spark.streams.awaitAnyTermination() # block until any one of them terminates
23182318
{% endhighlight %}
23192319

23202320
</div>

0 commit comments

Comments
 (0)