Skip to content

Commit ff6ec25

Browse files
cykltdas
authored andcommitted
Streaming programming guide typos
Fix a bad Java code sample and a broken link in the streaming programming guide. Author: Clément MATHIEU <[email protected]> Closes #1286 from cykl/streaming-programming-guide-typos and squashes the following commits: b0908cb [Clément MATHIEU] Fix broken URL 9d3c535 [Clément MATHIEU] Spark streaming requires at least two working threads (scala version was OK) (cherry picked from commit fdc4c11) Signed-off-by: Tathagata Das <[email protected]>
1 parent 1d36165 commit ff6ec25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/streaming-programming-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ import org.apache.spark.streaming.*;
148148
import org.apache.spark.streaming.api.java.*;
149149
import scala.Tuple2;
150150
// Create a StreamingContext with a local master
151-
JavaStreamingContext jssc = new JavaStreamingContext("local", "JavaNetworkWordCount", new Duration(1000))
151+
JavaStreamingContext jssc = new JavaStreamingContext("local[2]", "JavaNetworkWordCount", new Duration(1000))
152152
{% endhighlight %}
153153

154154
Using this context, we then create a new DStream
@@ -216,7 +216,7 @@ jssc.awaitTermination(); // Wait for the computation to terminate
216216
{% endhighlight %}
217217

218218
The complete code can be found in the Spark Streaming example
219-
[JavaNetworkWordCount]({{site.SPARK_GITHUB_URL}}/blob/master/examples/src/main/java/index.html?org/apache/spark/examples/streaming/JavaNetworkWordCount.java).
219+
[JavaNetworkWordCount]({{site.SPARK_GITHUB_URL}}/blob/master/examples/src/main/java/org/apache/spark/examples/streaming/JavaNetworkWordCount.java).
220220
<br>
221221

222222
</div>

0 commit comments

Comments
 (0)