This repository contains the code we wrote during Rock the JVM's Spark Essentials with Scala (Udemy version here) Unless explicitly mentioned, the code in this repository is exactly what was caught on camera.
- install Docker
- either clone the repo or download as zip
- open with IntelliJ as an SBT project
- Windows users, you need to set up some Hadoop-related configs - use this guide
- in a terminal window, navigate to the folder where you downloaded this repo and run
docker-compose up
to build and start the PostgreSQL container - we will interact with it from Spark - in another terminal window, navigate to
spark-cluster/
- Linux/Mac users: build the Docker-based Spark cluster with
chmod +x build-images.sh
./build-images.sh
- Windows users: build the Docker-based Spark cluster with
build-images.bat
- when prompted to start the Spark cluster, go to the
spark-cluster
directory and rundocker-compose up --scale spark-worker=3
to spin up the Spark containers with 3 worker nodes
Clone this repository and checkout the start
tag by running the following in the repo folder:
git checkout start
Udemy students: checkout the udemy
branch of the repo:
git checkout udemy
Rock the JVM students: checkout the master branch:
git checkout master
If you have changes to suggest to this repo, either
- submit a GitHub issue
- tell me in the course Q/A forum
- submit a pull request!