in order to run the twitter stream, a twitter developer account is required.
From the developer account, you need to have an app created with the app.
Information on how to create an app with twitter can be found at:
https://docs.inboundnow.com/guide/create-twitter-application/
running this project for Kafka and Spark requires to have zookeeper and kafka servers running.
Below are the steps to run those.
- cd into your kafka directory
in mac (installed via Brew)cd /usr/hdp/current/kafka-broker/
in linux :
cd /opt/kafka/<kafka_version>
else : wherever you install it
-
Run zookeeper server
./bin/zookeeper-server-start libexec/config/zookeeper.properties
-
Run kafka server
./bin/kafka-server-start libexec/config/server.properties
-
Create topics
./bin/kafka-topics --create --zookeeper localhost:2181 --partitions 1 --replication-factor 1 --topic colors
-
Create Producers
kafka-console-producer --broker-list localhost:9092 --topic colors
-
Create Consumers
kafka-console-consumer --bootstrap-server localhost:9092 --topic colors
- Make sure that the
build.sbt
has the appropriate dependencies.