In this part, we answer a set of questions and we ultimately propose an architecture for the project.
In this part, we propose an implementation of the architecture adapted to the project.
Name | Github account | |
---|---|---|
Erwan Goudard | [email protected] | Grouane |
Adrien Merat | [email protected] | Timelessprod |
Corentin Duchêne | [email protected] | Nigiva |
Henri Jamet | [email protected] | hjamet |
In case you get a an error saying Connection refused
or if you are using WSL, please restart your ssh service : sudo service ssh restart
. If you get a warning while executing the consumer or the producer, just press y
and enter.
- Install ZooKeeper and Kafka
- Inatall Hadoop, HDFS and Spark
- Install Pyenv and Poetry
-
Open a terminal and launch the ZooKeeper server :
zookeeper-server-start.sh config/zookeeper.properties
(let it run) -
In another terminal, create the Kafka topic :
kafka-topics.sh --create --topic "drone-report" --bootstrap-server localhost:9092
and then launch the Kafka server :kafka-server-start.sh config/server.properties
(let it run) -
In another terminal, start dfs and yarn services :
start-dfs.sh && start-yarn.sh
-
In another terminal, launch the website for monitoring :
cd website/
poetry shell
(we use Python 3.9.7 via Pyenv)flask run
-
In another terminal, launch the streaming consumer :
cd consumer && sbt run
(let it run) -
In another terminal, launch the streaming producer (chich will fake data send by drones by reading a json). Depending on the scenario you want to execute, execute one of the command below :
- For happy citizens, launch :
cd producer && sbt "run ../json/s2.json"
(let it run) - For coleric citizens, launch :
cd producer && sbt "run ../json/s2.json"
(let it run) - For anxious citizens, launch :
cd producer && sbt "run ../json/s3.json"
(let it run)
- For happy citizens, launch :
-
To check that data is correctly written on HDFS, you can launch
hdfs dfs -ls /drone-reports
. It should print the files containing data.
To stop the application, simply kill all processus running in the opened terminal with Ctrl+C
and run stop-dfs.sh && stop-yarn.sh