Skip to content
Snippets Groups Projects
Commit 41bfdda3 authored by CodingCat's avatar CodingCat Committed by Reynold Xin
Browse files

SPARK-1976: fix the misleading part in streaming docs

Spark streaming requires at least two working threads, but the document gives the example like

import org.apache.spark.api.java.function._
import org.apache.spark.streaming._
import org.apache.spark.streaming.api._
// Create a StreamingContext with a local master
val ssc = new StreamingContext("local", "NetworkWordCount", Seconds(1))
http://spark.apache.org/docs/latest/streaming-programming-guide.html

Author: CodingCat <zhunansjtu@gmail.com>

Closes #924 from CodingCat/master and squashes the following commits:

bb89f20 [CodingCat] update streaming docs
parent 23ae3663
No related branches found
No related tags found
No related merge requests found
...@@ -80,7 +80,8 @@ import org.apache.spark.api.java.function._ ...@@ -80,7 +80,8 @@ import org.apache.spark.api.java.function._
import org.apache.spark.streaming._ import org.apache.spark.streaming._
import org.apache.spark.streaming.api._ import org.apache.spark.streaming.api._
// Create a StreamingContext with a local master // Create a StreamingContext with a local master
val ssc = new StreamingContext("local", "NetworkWordCount", Seconds(1)) // Spark Streaming needs at least two working thread
val ssc = new StreamingContext("local[2]", "NetworkWordCount", Seconds(1))
{% endhighlight %} {% endhighlight %}
Using this context, we then create a new DStream Using this context, we then create a new DStream
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment