diff options
author | Gaspar Munoz <munozs.88@gmail.com> | 2014-10-01 13:47:22 -0700 |
---|---|---|
committer | Tathagata Das <tathagata.das1565@gmail.com> | 2014-10-01 13:47:22 -0700 |
commit | b81ee0b46d63c2122b88941696654100fd736942 (patch) | |
tree | 1e9993d0476cabe980570b0625368b3478762116 /examples | |
parent | 8cc70e7e15fd800f31b94e9102069506360289db (diff) | |
download | spark-b81ee0b46d63c2122b88941696654100fd736942.tar.gz spark-b81ee0b46d63c2122b88941696654100fd736942.tar.bz2 spark-b81ee0b46d63c2122b88941696654100fd736942.zip |
Typo error in KafkaWordCount example
topicpMap to topicMap
Author: Gaspar Munoz <munozs.88@gmail.com>
Closes #2614 from gasparms/patch-1 and squashes the following commits:
00aab2c [Gaspar Munoz] Typo error in KafkaWordCount example
Diffstat (limited to 'examples')
-rw-r--r-- | examples/src/main/scala/org/apache/spark/examples/streaming/KafkaWordCount.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/src/main/scala/org/apache/spark/examples/streaming/KafkaWordCount.scala b/examples/src/main/scala/org/apache/spark/examples/streaming/KafkaWordCount.scala index 566ba6f911..c9e1511278 100644 --- a/examples/src/main/scala/org/apache/spark/examples/streaming/KafkaWordCount.scala +++ b/examples/src/main/scala/org/apache/spark/examples/streaming/KafkaWordCount.scala @@ -53,8 +53,8 @@ object KafkaWordCount { val ssc = new StreamingContext(sparkConf, Seconds(2)) ssc.checkpoint("checkpoint") - val topicpMap = topics.split(",").map((_,numThreads.toInt)).toMap - val lines = KafkaUtils.createStream(ssc, zkQuorum, group, topicpMap).map(_._2) + val topicMap = topics.split(",").map((_,numThreads.toInt)).toMap + val lines = KafkaUtils.createStream(ssc, zkQuorum, group, topicMap).map(_._2) val words = lines.flatMap(_.split(" ")) val wordCounts = words.map(x => (x, 1L)) .reduceByKeyAndWindow(_ + _, _ - _, Minutes(10), Seconds(2), 2) |