MediumScenarioSpark production scenarios
Your Spark job on a 50-node cluster fails with executor lost and OOM during a groupBy. What do you check first?
What a good answer covers
Check partition size and shuffle spill in the UI, then raise spark.sql.shuffle.partitions or enable AQE coalescing and splitting, and avoid collect_list on huge groups. Only then raise executor memory or memoryOverhead, since more memory without fixing skew just moves the failure.
PreviousA Spark job's last stage has one task running 40 minutes while 199 others finish in 1 minute. How do you diagnose and fix it?Next Nightly job writes thousands of tiny Parquet files to S3 and downstream queries slow down. How do you fix it end to end?
More on Spark production scenarios
Flashcards for this topic- MediumA Spark job's last stage has one task running 40 minutes while 199 others finish in 1 minute. How do you diagnose and fix it?
- HardNightly job writes thousands of tiny Parquet files to S3 and downstream queries slow down. How do you fix it end to end?
- MediumA join between a 2 TB table and a 5 GB dimension is slow. What options do you consider?
- HardHow does Spark's Adaptive Query Execution change a plan at runtime?