spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject spark git commit: [DOCS] Fix typo for Python section on unifying Kafka streams
Date Mon, 09 Nov 2015 18:39:27 GMT
Repository: spark
Updated Branches:
  refs/heads/master cd174882a -> 874cd66d4


[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 <jckang@uchicago.edu>

Closes #9545 from c-kang/streaming_python_typo.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/874cd66d
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/874cd66d
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/874cd66d

Branch: refs/heads/master
Commit: 874cd66d4b6d156d0ef112a3d0f3bc5683c6a0ec
Parents: cd17488
Author: chriskang90 <jckang@uchicago.edu>
Authored: Mon Nov 9 19:39:22 2015 +0100
Committer: Sean Owen <sowen@cloudera.com>
Committed: Mon Nov 9 19:39:22 2015 +0100

----------------------------------------------------------------------
 docs/streaming-programming-guide.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/874cd66d/docs/streaming-programming-guide.md
----------------------------------------------------------------------
diff --git a/docs/streaming-programming-guide.md b/docs/streaming-programming-guide.md
index c751dbb..e9a27f4 100644
--- a/docs/streaming-programming-guide.md
+++ b/docs/streaming-programming-guide.md
@@ -1948,8 +1948,8 @@ unifiedStream.print();
 {% highlight python %}
 numStreams = 5
 kafkaStreams = [KafkaUtils.createStream(...) for _ in range (numStreams)]
-unifiedStream = streamingContext.union(kafkaStreams)
-unifiedStream.print()
+unifiedStream = streamingContext.union(*kafkaStreams)
+unifiedStream.pprint()
 {% endhighlight %}
 </div>
 </div>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org


Mime
View raw message