Skip to content

Commit

Permalink
Update kafka_wordcount.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Davies Liu committed Jan 27, 2015
1 parent 31e2317 commit dc1eed0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions examples/src/main/python/streaming/kafka_wordcount.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,9 @@
Counts words in UTF8 encoded, '\n' delimited text received from the network every second.
Usage: network_wordcount.py <zk> <topic>
To run this on your local machine, you need to setup Kafka and create a producer first
$ bin/zookeeper-server-start.sh config/zookeeper.properties
$ bin/kafka-server-start.sh config/server.properties
$ bin/kafka-topics.sh --create --zookeeper localhost:2181 --partitions 1 --topic test
$ bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test
To run this on your local machine, you need to setup Kafka and create a producer first, see
http://kafka.apache.org/documentation.html#quickstart
and then run the example
`$ bin/spark-submit --driver-class-path external/kafka-assembly/target/scala-*/\
spark-streaming-kafka-assembly-*.jar examples/src/main/python/streaming/kafka_wordcount.py \
Expand Down

0 comments on commit dc1eed0

Please sign in to comment.