Visualize Real Time Twitter Sentiment Analysis Elastic Search and Kibana
Before you start following this tutorial, make sure you have read earlier blog about how to do real time sentiment analysis using spark. Now, if you have followed the blog you will see at the end of code we are pushing data to elastic search. temp.saveJsonToEs("eclipse/test") // Writing to ElasticSearch Prerequisites: Install Elasticsearch ( open source ) Install Kibana ( open source) To push the data to elastic search, you need to include the jar dependency for Elasticsearch. Download Elastic search dependency. Make sure to import following libraries. import org.elasticsearch.spark._ import org.elasticsearch.spark.streaming._ We have two ways to push data to elastic search: In JSON format In Map RDD format We do not have to create index before pushing data. This syntax will create index on the fly. If you want to do manual mappings than you first have to create index with appropriate mappings. To do manual mappings, follow these instructions. Creat...