Apache Spark
How distributed dataframes plan, shuffle and scale.
How Apache Spark runs data processing across many machines: drivers and executors, RDDs and DataFrames, lazy evaluation, partitions, Spark SQL, the Catalyst optimiser, jobs, stages and tasks, the shuffle, join strategies, Adaptive Query Execution and vectorised engines; then performance (skew, memory, caching, file layout), Structured Streaming, PySpark and UDFs, and running and right-sizing Spark. Vendor-neutral: open-source Spark alongside Databricks, Amazon EMR, Google Dataproc, Azure and Fabric, and Kubernetes. By the end you can read a Spark plan and UI and make a slow job fast.
- 6
- chapters
- 21
- modules
- ~8h
- of learning
- 21
- live now
Take modules in any order. The route suggests one that builds up naturally.
has a live module in progress complete
Take a look inside
The big picture, before the details
One query's journey through Spark, from your code on the driver to files on storage. Watch the tour, or click any part.
Your code: a DataFrame query or SQL, written once; nothing runs until an action (modules 3–6).
A taste of module 10: change one table's size and the join condition, and see which strategy Spark picks and how much data moves.
orders (500 GB) JOIN other (3 MB)
Broadcast hash join
Copy the small side to every executor and build a hash table there. The big side never moves.
Data moved: 60 MB · the 500 GB side stays put
The big picture
Why Spark exists and what a Spark cluster looks like.
2 modules · 40 min
Data and APIs
How you describe work in Spark.
4 modules · 90 min
Beginner
RDDs, DataFrames and Datasets
Three ways to hold distributed data.
Beginner
Transformations, actions and laziness
Nothing happens until you ask for a result.
Core
Partitions and parallelism
How data is split into pieces of work.
Beginner
Spark SQL and the DataFrame API
Two front doors to one engine.
How a query runs
From your code to tasks on executors.
6 modules · 140 min
Core
The Catalyst optimiser
How Spark rewrites your query to run faster.
Core
Jobs, stages and tasks
Reading the Spark UI.
Core
The shuffle
The expensive step that moves data between machines.
Core
Join strategies
Broadcast, sort-merge and shuffle hash joins.
Core
Adaptive Query Execution
Re-planning a query while it runs.
Deep dive
Tungsten and vectorised engines
How Spark uses the CPU efficiently.
Performance
Making slow jobs fast.
4 modules · 95 min
Applied
Data skew
When one task does all the work.
Applied
Memory, spill and out-of-memory
Where executor memory goes.
Applied
Caching and persistence
Keeping results for reuse.
Applied
Reading and writing files
Partitions on disk, small files and pushdown.
Beyond batch
Streaming, Python and running Spark for real.
4 modules · 90 min
Core
Structured Streaming
The same DataFrames, on data that never ends.
Applied
PySpark, Arrow and UDFs
Python on a JVM engine.
Applied
Running Spark
Managed platforms, Kubernetes and Spark Connect.
Applied
Cost and right-sizing
Paying for what the job needs.
Capstone
Everything together.
1 module · 40 min