DE Mastery GitHub

Apache Spark · SPK-08

Memory, caching, and Adaptive Query Execution

From your world. Redshift WLM memory/spill-to-disk and query queues; diagnosing OOM

Practice quiz with instant feedback. For a scored run that counts toward your local progress, use uv run de quiz SPK-08.

1A job dies with java.lang.OutOfMemoryError: Java heap space. The stack trace points at a collect()/toPandas() call. Where did it OOM and what is the fix?
2How do execution memory and storage memory relate in Spark's unified model?
3What does df.cache() do, and when is it worth it?
4Which are genuine Adaptive Query Execution (AQE) optimizations that you can see in the final plan? (select all) (select all that apply)
5Why must you look at the FINAL executed plan (after an action) to see AQE's effects? Why is the plan from explain() before the run not enough?
6What do repeated log lines Spilling in-memory map ... to disk during an aggregation indicate?
7You cache a DataFrame, but you see no speedup and higher memory use. What likely happened?
8An executor OOMs during a shuffle. One task processed 50x more data than the others. Which fix targets the actual cause?