An Amazon EMR Spark job reads several large, splittable input files but slows during a shuffle stage. The stage has very few tasks, each spilling heavily to disk, while most executor cores are idle; which change should the engineer make first?
Show the answer
Correct answerD. Increase the number of shuffle partitions for the job.
AWhy not this: Combining input files does not address insufficient task parallelism in the shuffle stage.
BWhy not this: Longer log retention helps historical investigation but does not change shuffle parallelism or spilling.
CWhy not this: Additional cores cannot improve utilization when the shuffle stage already has too few tasks for the available cores.
DWhy this is right: More shuffle partitions distribute the shuffle data among more tasks, improving core utilization and reducing per-task memory pressure.
Increasing shuffle partitions creates more, smaller tasks, improving parallelism and reducing the data each task must process. Adding executor cores does not help when too few tasks exist to use the available cores.