InterviewStack.io LogoInterviewStack.io

Distributed Data Processing and Optimization Questions

Comprehensive knowledge of processing large datasets across a cluster and practical techniques for optimizing end to end data pipelines in frameworks such as Apache Spark. Candidates should understand distributed computation patterns such as MapReduce and embarrassingly parallel workloads, how work is partitioned across tasks and executors, and how partitioning strategies affect data locality and performance. They should explain how and when data shuffles occur, why shuffles are expensive, and how to minimize shuffle cost using narrow transformations, careful use of repartition and coalesce, broadcast joins for small lookup tables, and map side join approaches. Coverage should include join strategies and broadcast variables, avoiding wide transformations, caching versus persistence trade offs, handling data skew with salting and repartitioning, and selecting effective partition keys. Resource management and tuning topics include executor memory and overhead, cores per executor, degree of parallelism, number of partitions, task sizing, and trade offs between processing speed and resource usage. Fault tolerance and scaling topics include checkpointing, persistence for recovery, and strategies for horizontal scaling. Candidates should also demonstrate monitoring, debugging, and profiling skills using the framework user interface and logs to diagnose shuffles, stragglers, and skew, and to propose actionable tuning changes and coding patterns that scale in distributed environments.

MediumTechnical
0 practiced
Provide a scalable PySpark strategy to compute mean, standard deviation, and approximate 90th percentile for 200 numeric features across a 100GB dataset without collecting to driver, minimizing shuffles. Include code sketch, use of map-side aggregates and approximate quantile APIs, and describe how you'd handle NaNs and extremely skewed features.
HardTechnical
0 practiced
Discuss the trade-offs between using many small partitions (short tasks) versus fewer large partitions (long tasks) in Spark. Provide heuristics or a simple formula to choose partition count given: cluster_cores, desired task duration (seconds), and average per-record processing time. Explain scheduling overhead, serialization costs, and straggler impacts.
EasyTechnical
0 practiced
Explain the difference between repartition and coalesce in Spark. When should you use each? Describe the cost (shuffle vs no shuffle) and a scenario where coalesce with shuffle=true is the right choice. Also explain how these operations affect downstream data locality for ML training jobs.
EasyTechnical
0 practiced
You need to choose a file format for large ML feature tables used for both offline training and occasional point-in-time retrieval. Compare Parquet, Avro, and CSV for: compression, schema evolution, read performance for columnar features, and suitability for incremental compaction. Recommend one and justify your choice.
EasyTechnical
0 practiced
Define narrow and wide transformations in Spark. Give examples of each (RDD/DataFrame) and explain why wide transformations incur shuffles and are more expensive. For a simple aggregation pipeline, explain one code-level change that converts a wide transformation into a less expensive pattern.

Unlock Full Question Bank

Get access to hundreds of Distributed Data Processing and Optimization interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.