Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. You need zookeeper and kafka to run at the same time, so being in the directory where you have
  2. kafka installed run the command for zookeeper in one terminal
  3. bin/zookeeper-server-start.sh con g/zookeeper.properties
  4. And kafka in another one
  5. bin/kafka-server-start.sh con g/server.properties
  6. Open another terminal (3 up to this point), and create a topic for kafka
  7. bin/kafka-topics.sh {create {zookeeper localhost:2181 {replication-factor 1 {partitions
  8. 1 {topic tweets
  9. Once the topic is created, go to the directory where you have the Ribbit application and run the
  10. application
  11. nodejs app.js
  12. Then open another terminal and go to the directory where you have the spark application and run
  13. the jar le
  14. /usr/local/spark/bin/spark-submit {class TwitterStreaming {master local[4] target/streaming-
  15. 1.0.jar
  16. In total 4 terminals need to be opened: one for the zookeeper server, another for the kafka server,
  17. another to run the nodejs application (app.js) and another to run the spark application.
  18. 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement