-
Docker installed
-
Docker compose installed
docker build -t cluster-apache-spark:3.0.2 .
The final step to create your test cluster will be to run the compose file:
docker-compose up -d
docker exec -it apache-spark-cluster-docker_spark-worker-a_1 bash
pip3 install requests
/opt/spark/bin/spark-submit \
--master spark://spark-master:7077 \
--jars /opt/spark-apps/postgresql-42.2.22.jar \
--driver-memory 1G \
--executor-memory 1G \
/opt/spark-apps/task1_1.py