Skip to content

Commit e6f9cc9

Browse files
committed
Update the docs
1 parent 27833bb commit e6f9cc9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/streaming-programming-guide.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ main entry point for all streaming functionality. We create a local StreamingCon
6666
{% highlight scala %}
6767
import org.apache.spark._
6868
import org.apache.spark.streaming._
69+
import org.apache.spark.streaming.StreamingContext._ // not necessary in Spark 1.3+
6970

7071
// Create a local StreamingContext with two working thread and batch interval of 1 second.
7172
// The master requires 2 cores to prevent from a starvation scenario.
@@ -97,6 +98,7 @@ each line will be split into multiple words and the stream of words is represent
9798
`words` DStream. Next, we want to count these words.
9899

99100
{% highlight scala %}
101+
import org.apache.spark.streaming.StreamingContext._ // not necessary in Spark 1.3+
100102
// Count each word in each batch
101103
val pairs = words.map(word => (word, 1))
102104
val wordCounts = pairs.reduceByKey(_ + _)

0 commit comments

Comments
 (0)