Repository: spark
Updated Branches:
  refs/heads/branch-1.6 7b4d7abfc -> 006d73a74


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

Closes #9545 from c-kang/streaming_python_typo.

(cherry picked from commit 874cd66d4b6d156d0ef112a3d0f3bc5683c6a0ec)
Signed-off-by: Sean Owen <so...@cloudera.com>


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

Branch: refs/heads/branch-1.6
Commit: 006d73a741f92840f747a80c372f2d3f49fe7a1f
Parents: 7b4d7ab
Author: chriskang90 <jck...@uchicago.edu>
Authored: Mon Nov 9 19:39:22 2015 +0100
Committer: Sean Owen <so...@cloudera.com>
Committed: Mon Nov 9 19:39:33 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/006d73a7/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-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to