This is a program that use Spark and Twitter Stream to analysis the emotion skill at different location. We pick Bay Area, Los Angles, and San Diago in this example.
##Please follow the following steps to run the application##
- Step 1: Download the code Download the 0.8.2.0 release and un-tar it.
> tar -xzf kafka_2.10-0.8.2.0.tgz
> cd kafka_2.10-0.8.2.0
- Step 2: Start the ZooKeeper and Kafka server
> bin/zookeeper-server-start.sh config/zookeeper.properties
> bin/kafka-server-start.sh config/server.properties
- Step 3: Create a topic
> bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic twitter-stream
This application will send an POST request to an NodeJS server with URL http://localhost:3000/post
Download or clone [EmotionAnalysisNodeJs][1] server and run
npm install
node src/index.js
- Download [Intellij][2] and open run it
- Clone the project to local and import into Intellij
- Let SBT download the dependencies
- Run TwitterProducer object, should see application running and twitter feeds coming in.
- Run EmotionAnalysis object, should see application start running.
- Open browser and go to
localhost:3000
- Should see information coming up
There are also other files in the folder that is not in the project but is also runnable.
[1] https://github.com/CocoHot/EmotionAnalysisNodeJS [2] https://www.jetbrains.com/idea/download/