An AWS Glue Spark job joins two large tables, clickstream and orders, on customer_id. The Spark UI shows a few tasks in the join stage running far longer than the rest and failing with executor out-of-memory errors, because a handful of customer_id values hold most of the rows. Which change MOST directly addresses the cause?
Show the answer
Correct answerA. Salt the skewed join keys before the join
AWhy this is right: Salting splits each hot key's rows across many partitions, so no single task has to hold them all.
BWhy not this: More workers add parallelism, but each hot key's rows still land in one partition handled by one task.
CWhy not this: Fewer shuffle partitions make each partition larger and worsen the memory pressure.
DWhy not this: A large table is too big to broadcast, so copying it to every executor would move the memory problem to all of them.
The failures come from data skew: every row for a hot key lands in one partition, so one task holds far more data than its executor's memory. Salting adds a random suffix to those keys so their rows split across many partitions. More workers do not change how many rows one partition gets.