Skip to content

Commit 41bfdda

Browse files
CodingCatrxin
authored andcommitted
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 <[email protected]> Closes #924 from CodingCat/master and squashes the following commits: bb89f20 [CodingCat] update streaming docs
1 parent 23ae366 commit 41bfdda

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/streaming-programming-guide.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ import org.apache.spark.api.java.function._
8080
import org.apache.spark.streaming._
8181
import org.apache.spark.streaming.api._
8282
// Create a StreamingContext with a local master
83-
val ssc = new StreamingContext("local", "NetworkWordCount", Seconds(1))
83+
// Spark Streaming needs at least two working thread
84+
val ssc = new StreamingContext("local[2]", "NetworkWordCount", Seconds(1))
8485
{% endhighlight %}
8586

8687
Using this context, we then create a new DStream

0 commit comments

Comments
 (0)