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.

MediumSystem Design
59 practiced

Design a Spark Structured Streaming job to compute session-based metrics where late events can arrive up to 48 hours late. Explain watermark settings, state retention, checkpointing location, and how to size state store resources. Describe how you would handle late events beyond the watermark and how to backfill historical data without corrupting streaming state.

MediumTechnical
62 practiced

What are the performance implications of setting spark.sql.shuffle.partitions very high or very low? Provide a rule-of-thumb formula to pick an initial value and explain how skewed data or cluster size affects your choice.

HardTechnical
81 practiced

Implement or outline a distributed reconciliation job in Spark that computes per-user checksums between source and reporting tables for a month and emits row-level deltas for records that differ. Discuss data partitioning, joins, how to compute stable checksums across possible schema changes, and performance optimizations (broadcast joins, bucketing, shuffle reduction). Provide pseudocode or PySpark snippets.

MediumTechnical
65 practiced

A Spark job fails with a 'TaskNotSerializableException' when you submit a job that references a large third-party object in a closure. Explain how serialization works for closures, common sources of this error in Scala and PySpark, and practical steps to fix or work around it.

EasyTechnical
82 practiced

When a Spark ML training job runs slowly, which tabs and metrics in the Spark UI and History Server do you inspect first? Provide a short troubleshooting checklist describing what to look for in stages, tasks, executors, storage, and SQL tabs to identify causes such as skew, shuffle bottlenecks, or GC overhead.

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.