An simple example to simulate messages from a connected car
Here is the message flow
CarEventsProducer ==> kafka ==> SparkStreaming ==> Solr ==> Dahsboard
Pre-requisites:
- Kafka
- Solr Cloud
- Spark YARN/local
- banana (optional for dashboards)
Downloads:
Download dependent bits from and untar them into a folder
- Spark http://www.apache.org/dyn/closer.lua/spark/spark-1.6.1/spark-1.6.1-bin-hadoop2.6.tgz
- Solr http://archive.apache.org/dist/lucene/solr/5.5.1/solr-5.5.1.tgz
- Kafka http://apache.cs.utah.edu/kafka/0.9.0.1/kafka_2.11-0.9.0.1.tgz
- Banana https://github.com/lucidworks/banana
Steps:
- Copy the scripts in src/main/resources into the folder where the software was extracted
- Set the paths in the scripts accordingly
- Start zookeeper & Kafka
- Start Solr
- Initialize solr
- Create kafka topic
- Start events producer
- Start spark streaming
- View records in Solr UI and/or banana
Notes:
- To delete all records in solr collection curl http://localhost:8983/solr/connectedCarData/update -H "Content-Type: text/xml" --data-binary ':'
- Enable kafka delete topics if you plan on deleting the topics
- Copy the entire banana folder to solr-5.5.1/server/solr-webapp/webapp/ for dashboard
- Your dashboard url will be http://localhost:8983/solr/banana/src/index.html