Skip to content

Commit a33fd73

Browse files
chriskang90srowen
authored andcommitted
[DOCS] Fix typo for Python section on unifying Kafka streams
1) kafkaStreams is a list. The list should be unpacked when passing it into the streaming context union method, which accepts a variable number of streams. 2) print() should be pprint() for pyspark. This contribution is my original work, and I license the work to the project under the project's open source license. Author: chriskang90 <[email protected]> Closes #9545 from c-kang/streaming_python_typo. (cherry picked from commit 874cd66) Signed-off-by: Sean Owen <[email protected]>
1 parent 6b314fe commit a33fd73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/streaming-programming-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1948,8 +1948,8 @@ unifiedStream.print();
19481948
{% highlight python %}
19491949
numStreams = 5
19501950
kafkaStreams = [KafkaUtils.createStream(...) for _ in range (numStreams)]
1951-
unifiedStream = streamingContext.union(kafkaStreams)
1952-
unifiedStream.print()
1951+
unifiedStream = streamingContext.union(*kafkaStreams)
1952+
unifiedStream.pprint()
19531953
{% endhighlight %}
19541954
</div>
19551955
</div>

0 commit comments

Comments
 (0)