Skip to content

Commit b15866c

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 2111b59 commit b15866c

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
@@ -2539,11 +2539,11 @@ spark.streams().awaitAnyTermination(); // block until any one of them terminat
25392539
{% highlight python %}
25402540
spark = ... # spark session
25412541

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

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

2546-
spark.streams().awaitAnyTermination() # block until any one of them terminates
2546+
spark.streams.awaitAnyTermination() # block until any one of them terminates
25472547
{% endhighlight %}
25482548

25492549
</div>

0 commit comments

Comments
 (0)