Python API demo: real time flights delay prediction
Before running the demo you need to install Maven, Sbt, Kafka and Numpy.
-
Get into demo folder
cd path/to/insightedge-python-demo
-
Set INSIGHTEDGE_HOME and KAFKA_HOME env vars
export INSIGHTEDGE_HOME="path/to/insightedge" export KAFKA_HOME="path/to/kafka"
-
Install InsightEdge into maven repo
$INSIGHTEDGE_HOME/sbin/insightedge-maven.sh
-
Launch InsightEdge
$INSIGHTEDGE_HOME/sbin/insightedge.sh --mode demo
-
Launch Kafka with
./scripts/kafka-start.sh
-
Submit model training job
./scripts/spark-model-training-job.sh
-
Submit flight delay prediction job
./scripts/spark-flight-delay-prediction-job.sh
. Please note that this is endless job. -
In separate terminal tab submit data to Kafka topic
./scripts/kafka-submit-data.sh
. In the console you will see rows which were sent to the Kafka topic. -
Run web application
sbt web/run
-
Investigate results
-
in Zeppelin(http://127.0.0.1:8090), import a notebook from zeppelin folder
-
in web app(http://localhost:9000)
-
To shutdown InsightEdge run
$INSIGHTEDGE_HOME/sbin/insightedge.sh --mode shutdown
-
To shutdown Kafka run
./scripts/kafka-stop.sh
-
To stop prediction Spark job
./scripts/spark-stop-prediction-job.sh