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:51 GMT
Repository: spark
Updated Branches:
  refs/heads/branch-1.5 6b314fe9e -> a33fd737c


[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.

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


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

Branch: refs/heads/branch-1.5
Commit: a33fd737cb5db7200bb8ebb080f729f85fcc7c47
Parents: 6b314fe
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:45 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/a33fd737/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