Lesson · 5 pages · about 4 min
Spark in one picture
A driver plans the job and splits it into stages at every shuffle; executors run one task per piece of data. Measured: what more executors buy, and why a join costs more than a total.
- What it is
- Apache Spark crunches huge amounts of data, hundreds of gigabytes and more, by splitting the work into tasks that run on many machines at once.
- What it is for
- One machine would take hours to read a day of orders. Spark spreads the reading and adding up over a cluster, so it takes minutes.
- Use it when
- For data too big for one machine: nightly jobs over a day or a year of records, building tables for reports and machine learning.
- Not when
- Under a few gigabytes. One machine with a database, or DuckDB, is simpler, cheaper and often faster.
Words you’ll learn
- Batch job
- Stage
- Shuffle
- Driver
- Executor
- Task slot
- Spark
- Executor-hours
- Join