Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- You need zookeeper and kafka to run at the same time, so being in the directory where you have
- kafka installed run the command for zookeeper in one terminal
- bin/zookeeper-server-start.sh cong/zookeeper.properties
- And kafka in another one
- bin/kafka-server-start.sh cong/server.properties
- Open another terminal (3 up to this point), and create a topic for kafka
- bin/kafka-topics.sh {create {zookeeper localhost:2181 {replication-factor 1 {partitions
- 1 {topic tweets
- Once the topic is created, go to the directory where you have the Ribbit application and run the
- application
- nodejs app.js
- Then open another terminal and go to the directory where you have the spark application and run
- the jar le
- /usr/local/spark/bin/spark-submit {class TwitterStreaming {master local[4] target/streaming-
- 1.0.jar
- In total 4 terminals need to be opened: one for the zookeeper server, another for the kafka server,
- another to run the nodejs application (app.js) and another to run the spark application.
- 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement