aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorTathagata Das <tathagata.das1565@gmail.com>2013-02-19 03:05:44 -0800
committerTathagata Das <tathagata.das1565@gmail.com>2013-02-19 03:05:44 -0800
commit7e30c46aaf337eb95c9ec37ddc2ad79439430c96 (patch)
tree4ed7422380ffcd0126053d419c97082cc32fc83e /examples
parent7851b34e97bd2ee2faf722d7bb2f5472d0cd086e (diff)
downloadspark-7e30c46aaf337eb95c9ec37ddc2ad79439430c96.tar.gz
spark-7e30c46aaf337eb95c9ec37ddc2ad79439430c96.tar.bz2
spark-7e30c46aaf337eb95c9ec37ddc2ad79439430c96.zip
Added comment to the KafkaWordCount, given by Sean McNamara.
Diffstat (limited to 'examples')
-rw-r--r--examples/src/main/scala/spark/streaming/examples/KafkaWordCount.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/src/main/scala/spark/streaming/examples/KafkaWordCount.scala b/examples/src/main/scala/spark/streaming/examples/KafkaWordCount.scala
index 65d5da82fc..9b135a5c54 100644
--- a/examples/src/main/scala/spark/streaming/examples/KafkaWordCount.scala
+++ b/examples/src/main/scala/spark/streaming/examples/KafkaWordCount.scala
@@ -10,6 +10,18 @@ import spark.streaming.StreamingContext._
import spark.storage.StorageLevel
import spark.streaming.util.RawTextHelper._
+/**
+ * Consumes messages from one or more topics in Kafka and does wordcount.
+ * Usage: KafkaWordCount <master> <zkQuorum> <group> <topics> <numThreads>
+ * <master> is the Spark master URL. In local mode, <master> should be 'local[n]' with n > 1.
+ * <zkQuorum> is a list of one or more zookeeper servers that make quorum
+ * <group> is the name of kafka consumer group
+ * <topics> is a list of one or more kafka topics to consume from
+ * <numThreads> is the number of threads the kafka consumer should use
+ *
+ * Example:
+ * `./run spark.streaming.examples.KafkaWordCount local[2] zoo01,zoo02,zoo03 my-consumer-group topic1,topic2 1`
+ */
object KafkaWordCount {
def main(args: Array[String]) {