aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorCodingCat <zhunansjtu@gmail.com>2014-05-30 22:06:08 -0700
committerReynold Xin <rxin@apache.org>2014-05-30 22:06:08 -0700
commit41bfdda3cc53b44b0fb2105533b7c0e1a69eb3bb (patch)
tree0cc0731edbd456c72a605eb58b59ff466db9e3e4 /docs
parent23ae36630aa5e6ca4a86e32912a99408129dff7b (diff)
downloadspark-41bfdda3cc53b44b0fb2105533b7c0e1a69eb3bb.tar.gz
spark-41bfdda3cc53b44b0fb2105533b7c0e1a69eb3bb.tar.bz2
spark-41bfdda3cc53b44b0fb2105533b7c0e1a69eb3bb.zip
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
Diffstat (limited to 'docs')
-rw-r--r--docs/streaming-programming-guide.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/streaming-programming-guide.md b/docs/streaming-programming-guide.md
index b95f818d0f..bbee67f54c 100644
--- a/docs/streaming-programming-guide.md
+++ b/docs/streaming-programming-guide.md
@@ -80,7 +80,8 @@ 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))
+// Spark Streaming needs at least two working thread
+val ssc = new StreamingContext("local[2]", "NetworkWordCount", Seconds(1))
{% endhighlight %}
Using this context, we then create a new DStream