Shuffle Operations Lab
Choose where the data comes from (object-store files, an RDBMS over JDBC, an MPP warehouse), what the DataFrame does
(from a plain select to joins, windows and a full multi-shuffle pipeline), where it lands, and how big it is.
The lab rebuilds the physical plan, stages, exchanges, partition sizes, spill, task timeline and tuning advice on every change.
The cost model is illustrative: it uses real Spark rules (maxPartitionBytes/openCostInBytes split sizing, hash/range partitioning,
partial aggregation, AQE coalesce and skew-join thresholds, broadcast thresholds) with simplified throughput numbers. Use it to reason about
shape and direction — then confirm on your cluster in the Spark UI.
1. Build a Workload
Source → DataFrame operation → Target, at a given volume, data shape and cluster configNULL or a default customer).spark.sql.shuffle.partitionsspark.sql.autoBroadcastJoinThresholdadaptive.enabled)2. Stages, Exchanges & Physical Plan
Every red arrow is a shuffle boundary: map tasks write shuffle files, reduce tasks fetch them over the network3. Reducer Partitions & Executor Timeline
Where skew, empty partitions and spill come from — and what AQE does about them4. Tuning Advisor
Findings for the current workload, worst first, each with a fix5. Same Workload, Varying Volume
100 MB → 10 TB under three configurations: why a fixed 200 partitions breaks at both ends6. Narrow vs Wide: When Does a Shuffle Happen?
Operation ladder from simple select to complex pipelines — click "Load" to simulate any rowselect · filter · withColumn · map · union · coalesce — pipelined in one stage, no data movement.
groupBy · distinct · join (non-broadcast) · orderBy · window · repartition — stage boundary, disk + network.