Distributed Data Processing with Spark and Hadoop Questions

Distributed compute engines for large-scale data processing, with Apache Spark as the primary focus: driver/executor architecture, the RDD/DataFrame/Dataset APIs, lazy evaluation and the Catalyst/Tungsten optimizers, shuffle and partitioning, data skew detection and mitigation (salting, broadcast joins, adaptive query execution), memory tuning, and caching/persistence strategies. Covers engine-internal execution and recovery within a single job: how the DAG scheduler breaks work into stages and tasks, task retries, speculative execution, stage recomputation from RDD lineage, and Structured Streaming's own checkpointing and write-ahead logs for exactly-once semantics. Also covers the Hadoop ecosystem as historical foundation (HDFS, MapReduce, YARN, Hive) and modern lakehouse table formats (Delta Lake, Iceberg) that have largely replaced it in current interview practice. The distributed-processing depth expected of data engineers at scale: writing and tuning jobs, diagnosing OOMs and skew, and choosing the right engine, storage format, and cluster configuration for a workload. Distinct from workflow-orchestration-and-scheduling, which owns the external, Airflow-style scheduler that invokes jobs like these as steps in a larger multi-system pipeline, and from data-reliability-and-fault-tolerance, which owns designing idempotent, cross-system pipeline behavior around job failures rather than the engine's own internal recovery mechanics.

MediumTechnical
67 practiced

Describe the main join strategies Spark may choose: broadcast-hash-join, shuffle-hash-join, and sort-merge-join. For a join between a 200M-row 'events' table and a 50k-row 'countries' lookup table, which strategy will Spark likely pick and why? Explain how to inspect and influence the planner (EXPLAIN, hints, configuration).

EasyTechnical
78 practiced

Compare RDDs, DataFrames, and Datasets in Spark. For typical feature-engineering and ETL workflows in PySpark and Scala, which API would you prefer and why? Discuss trade-offs with respect to performance (Catalyst/Tungsten), type-safety, and when you might still choose RDDs.

MediumTechnical
72 practiced

How does partition pruning and predicate pushdown reduce the amount of data scanned by queries? Provide an example SQL/DataFrame query and Parquet partitioning scheme where pruning avoids scanning large partitions, and explain common reasons pruning fails (non-deterministic expressions, functions on partition columns).

EasyTechnical
76 practiced

Explain the difference between narrow and wide transformations in Apache Spark. Provide examples (for example map and filter as narrow; groupByKey, reduceByKey and join as wide). Explain precisely when a wide transformation triggers a shuffle, why that shuffle matters for performance, and how you would refactor a pipeline to reduce wide transformations when possible.

MediumTechnical
74 practiced

Explain how join skew can be diagnosed using Spark UI metrics and job logs. What signs in the UI indicate one or a few tasks are handling disproportionate data? Provide a method to programmatically sample and quantify skew before running the full job.

Unlock Full Question Bank

Get access to all Distributed Data Processing with Spark and Hadoop interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.