Data Operations and Support

An Amazon EMR Spark aggregation has one task running far longer than the others and spilling heavily to disk. Most records share one grouping key. Which change best addresses the underlying bottleneck?

Show the answer

Correct answerB. Distribute the hot key using salting and combine partial aggregates.

AWhy not this: Longer log retention improves historical visibility but does not change the workload distribution.

BWhy this is right: Salting spreads a hot key across tasks; combining partial aggregates restores the intended grouping.

CWhy not this: Fewer partitions reduce parallelism and can increase the amount of data processed by each task.

DWhy not this: Additional workers do not redistribute a hot key that remains assigned to a single aggregation partition.

The hot grouping key causes data skew, concentrating work in one task. Salting distributes that work before combining partial aggregates; adding workers alone does not split a single hot-key partition.