A Spark job on LLM text data fails with skew and out-of-memory errors

MediumConcept20 minSWEMLEPro outline

The question

A Spark job that cleans web text for pretraining keeps failing: a few tasks run forever and some executors die out of memory. How do you diagnose and fix it?

What the interviewer is looking for

  • Distinguishes wide and narrow dependencies and where shuffles happen
  • Finds skewed keys from the UI or sampling
  • Fixes skew with salting, splitting hot keys or broadcast joins
  • Fixes memory with partitions, spill settings and avoiding collect
  • Chooses columnar formats sensibly

Your answer

Saved in this browser only. Nobody else sees it.

Why this question

Written by BlogLLM in the style of a publicly reported StepFun question type: Spark skew and out-of-memory failures, storage formats and warehouse layers.

Reported in: nowcoder.com

Practice question written by BlogLLM based on publicly reported interview formats. Not an official StepFun question.