InterviewStack.io LogoInterviewStack.io

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.

EasyTechnical
82 practiced

When exactly does a shuffle occur in a Spark job? List common operations that cause shuffles, describe why shuffles are expensive (network, serialization, disk spill, sort), and name the Spark UI / metric fields you would inspect to confirm that a given stage is shuffle-heavy.

HardTechnical
74 practiced

Show how to write a compact, production-ready PySpark job that reads incrementally partitioned Parquet data (by dt=YYYY-MM-DD) and processes only new partitions since last successful run. Discuss how you'd store and read the watermark/offset state and handle reprocess or backfill needs.

EasyTechnical
75 practiced

Explain the MapReduce computation pattern and how it maps to Spark RDD and DataFrame operations. Use the classical word-count example and indicate which Spark transformations/actions correspond to map, combine and reduce. Discuss scenarios where MapReduce semantics are insufficient and how Spark's DAG, in-memory caching, and DataFrame optimizations extend the model.

EasyTechnical
74 practiced

Compare Hive and HBase in terms of data model, query patterns, latency, and typical use cases. For a given use case (analytics over large historical datasets vs random low-latency lookups by key), explain which system you would choose, why, and how you might integrate both in a single architecture.

MediumTechnical
72 practiced

Given a transactions table schema transactions(transaction_id string, user_id string, amount double, occurred_at timestamp), write a Spark SQL query or DataFrame code to compute a running total of amount per user ordered by occurred_at. Explain how you would handle ties in timestamps and performance considerations for large inputs.

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.