InterviewStack.io LogoInterviewStack.io

Spark and Hadoop Basics Questions

Fundamentals of big data processing with Apache Spark and Apache Hadoop, including core concepts, architecture (HDFS, YARN, MapReduce), Spark components (RDDs, DataFrames, Spark SQL), and basic data pipeline patterns for batch and streaming workloads.

HardTechnical
57 practiced
Explain how to create a custom Partitioner for RDDs in Spark to deterministically distribute keys across partitions. Describe the required methods, how to register and apply the partitioner to pair RDDs, and outline code or pseudocode for a partitioner that hashes a composite key while pinning certain hot keys to fixed partitions for stability.
MediumSystem Design
56 practiced
Given a clickstream dataset with fields user_id, timestamp, page, country and session_id, propose a partitioning and bucketing strategy for long-term storage to balance query performance, small-files risk, and schema evolution. Explain why you selected particular partition columns and whether to use bucketing, and how you would manage compaction.
HardSystem Design
52 practiced
Design a secure, multi-tenant Spark-on-YARN cluster supporting several teams with different SLAs. Address resource isolation, queue and capacity configuration, authentication and authorization (Kerberos, Ranger/Atlas), data access controls, audit logging, monitoring, and cost allocation for chargeback purposes.
HardTechnical
54 practiced
Design a Structured Streaming approach that needs to write to a non-idempotent external system (for example a third-party billing API) while guaranteeing exactly-once semantics. Discuss idempotency wrappers, deduplication using unique event IDs, write-ahead logs or transactional sinks, and practical limitations of two-phase commit across distributed systems.
HardSystem Design
73 practiced
Architect an end-to-end streaming pipeline capable of ingesting and processing 1 million events per second. Include component choices (Kafka, schema registry, Spark Structured Streaming or alternatives), partitioning and topic design, consumer parallelism, backpressure handling, checkpointing, sinks and storage layout, cost/performance trade-offs, and failure and replay strategies for a Data Engineering team.

Unlock Full Question Bank

Get access to hundreds of Spark and Hadoop Basics interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.