Big data interview questions anchor data engineering, analytics platform, and ML infrastructure hiring loops, because most companies now hold more data than any single machine can store or process on its own. This page is a complete, tiered bank: 104 questions with worked answers, organized into beginner, intermediate, and scenario sections, plus hands-on labs, a command cheat sheet, and a knowledge check at the end. Work through it in order, or jump straight to the tier that matches your next interview round.

TL;DR
- 104 questions, three tiers. Beginner vocabulary, intermediate mechanics, and realistic scenario rounds across HDFS, object stores, Spark, streaming, and orchestration, each with a worked answer.
- Answers name the mechanism. Every answer states the component that owns the behavior, the command or setting that exposes it, and one operational caveat, which is exactly the shape big data interview questions reward.
- Practice is built in. Three scenario labs you can run on a laptop, a cheat sheet of the diagnostic commands that come up most, and a five-question quiz to check what stuck.
How the big data interview works in 2026
Most big data interview questions arrive in one of three rounds. The first is a screening call with a hiring manager or senior data engineer, and it mixes definitions with quick checks: the difference between a data lake and a warehouse, what the V’s actually measure, batch versus streaming in one sentence, why Parquet beat CSV for analytics. These are confidence filters. Nobody expects a lecture; they expect a crisp 30-second answer with one level of detail behind it.
The second round is the deep technical. This is where big data interview questions get mechanical: the HDFS read and write paths, why Spark splits a job into stages at shuffle boundaries, what a watermark closes and when, what a table format adds to raw Parquet files, how Airflow decides a run is safe to rerun. Interviewers at this stage are listening for whether your knowledge has edges. Saying Spark is fast because it is in memory passes a beginner bar; explaining lazy evaluation, pipelined narrow stages, and shuffle costs passes a working-engineer bar. Big data interview questions at this level are graded on that second sentence, not the first.
The third round is the scenario round, sometimes live in a notebook against a real cluster, sometimes whiteboard, increasingly take-home. You get a broken pipeline in one sentence: the nightly job that took 40 minutes now takes four hours, one Spark task holds 90 percent of the runtime. What is scored is your diagnostic order and the reasoning behind it, not luck. Engineers who say first I check the plan, then the file counts, then the task metrics, because outperform engineers who guess at fixes. Most scenario big data interview questions are won or lost on the order of checks.
Role shape moves the emphasis. Data engineering roles weight Spark SQL, modeling, orchestration, and warehouse work; platform and infrastructure roles push harder on storage internals, cluster operations, and cost; streaming-heavy roles probe Kafka, watermarks, and state management; ML-adjacent roles add feature pipelines and training data quality. In every case the base bank on this page is the same, and only the depth expectation moves.
Preparation that works is boringly mechanical. Drill the explanations until each one is 30 to 60 seconds spoken, then run the labs until the commands are reflexes, then rehearse the scenario section out loud the way you would rehearse a demo. If you can narrate every item in this bank, you are ahead of most candidates. Treat big data interview questions like a performance, because at the offer stage that is what the round is.
Core concepts interviewers expect you to know
Three mental models unlock most of the bank: how the storage layer holds data, how the compute engine executes your query, and how batch, streaming, and the lakehouse divide the workload. Interviewers open big data interview questions with these because everything else is an extension of them, and a candidate who narrates all three fluently turns follow-ups into easy scoring chances.
The storage layer: blocks, replication, and object stores
HDFS is the classic answer when storage questions come up. It splits files into large blocks, 128 or 256 MB by default, and places each block on three DataNodes for fault tolerance. A separate NameNode holds all metadata in RAM: which blocks make up which file, and where each replica lives. The large block size is deliberate. Opening and tracking a file costs the same whether it holds one megabyte or 200, so big blocks keep the per-file metadata small and the NameNode’s memory budget viable. That is also the root cause of the small files problem.
Cloud object stores, S3, GCS, and ADLS, replaced much of that design. There is no NameNode; metadata lives in the service’s control plane, durability comes from erasure coding across facilities rather than threefold block replication, and access is HTTP. The consequence that reshaped the industry: storage and compute decoupled, so clusters became ephemeral and data became permanent. The operational tax is metadata: listing millions of objects is slow and billed per request, which is why table formats carry file lists in manifests. Modern big data interview questions increasingly test this tradeoff rather than raw HDFS trivia.
How Spark actually executes your query
The execution model is where intermediate big data interview questions live. A Spark program runs on a driver, which parses your DataFrame code, builds a logical plan, optimizes it with Catalyst, and converts it into a physical plan of stages. Stages split at shuffle boundaries: narrow transformations like filter and select pipeline within a stage, while wide ones like groupBy and join require data to be redistributed across the network, which ends the stage. Within a stage, tasks run one per partition on executors, which also hold cached blocks. Nothing runs until an action like count() or write triggers it, because transformations only extend the plan.
The consequences are what interviewers probe. The shuffle is the expensive step, disk writes plus network transfer plus serialization, so join strategy and partition layout dominate performance work. Caching trades executor memory for skipping recompute, and because RDDs hold lineage rather than copies, Spark recovers lost partitions by recomputing them from source. Almost every performance question in big data interview questions reduces to: where are the shuffles, how big are they, and is the data laid out to keep them small.
Batch, streaming, and the lakehouse
Batch and streaming differ in one property and everything follows from it: whether the input is bounded. Batch jobs see a fixed dataset, optimize for throughput, and run on schedules measured in minutes or hours. Streaming jobs see input that never ends, so they keep state, and the hard questions become event time versus processing time, windowing, watermarks, and what happens to state when windows close. Structured Streaming implements streaming as incremental batches on the same DataFrame API, while Flink processes records continuously; interviewers care more that you know where the state lives than which engine you used.
The lakehouse is the third model, and it is the one reshaping job descriptions. A data lake holds open-format files on cheap object storage but historically offered no transactions. A warehouse offers ACID guarantees and fast SQL on managed, pricier storage. A lakehouse gets both by putting a table format, Delta Lake, Iceberg, or Hudi, over the lake files: a transaction log turns concurrent writes into optimistic transactions, snapshots enable time travel, and manifests make planning fast without listing. Big data interview questions about lakes versus warehouses are really asking whether you understand what problem each layer solves.
Everything else in the bank extends these three models. Formats are the storage model with an encoding twist, partitioning is the storage model laid out for pruning, orchestration is the execution model scheduled over time, and data quality is a contract enforced across all three. When you rehearse, keep asking which layer owns this behavior, because that is the question underneath most big data interview questions, and experienced interviewers know it.
Question bank at a glance
The bank below mirrors how big data interview questions actually flow in a real loop: vocabulary first, mechanisms second, and a failure diagnosis last, with difficulty rising inside each tier. The counts are exact, so you can pace a week of prep: roughly 15 questions a day clears the bank in a working week, leaving the labs and cheat sheet for the weekend.
| Section | Questions | What it proves |
|---|---|---|
| Beginner | 38 | You speak the vocabulary: V’s, storage, formats, batch versus stream, orchestration terms. |
| Intermediate | 40 | You know the mechanisms: read and write paths, stages and shuffles, watermarks, table format internals. |
| Scenario and troubleshooting | 26 | You can diagnose a broken pipeline in a defensible order and name the knob that fixes it. |
Every answer includes the mechanism plus the consequence, because big data interview questions are graded on both halves: naming the component that owns the behavior, and saying why it behaves that way under load. If a tier starts feeling easy near its end, that is the signal to move to the next one.
Beginner big data interview questions
These 38 are the warm-up tier of big data interview questions. They look easy, and that is the trap: interviewers use them to check precision and to set the pace of the round. Answer each one in one or two sentences, then add exactly one supporting detail. Say more than that and you burn round time; say less and you sound like you memorized a list the night before.
What is big data, and do the 3 V’s still define it?
Answer: Big data is data whose volume, speed of arrival, or variety exceeds what one machine can store or process in acceptable time, which forces a distributed architecture. The classic 3 V’s are volume, terabytes to petabytes, velocity, the arrival rate, and variety, tables, logs, text, and images. The definitions still hold, though most working teams now care more about cost per query and freshness than the V’s themselves. Expect big data interview questions to open here because the V’s predict which infrastructure you will be asked about next.
What are the 5 V’s of big data?
Answer: Volume, velocity, and variety, plus veracity, how trustworthy and clean the data is, and value, whether anyone can act on it. The first three describe the engineering problem, and the last two describe why it is worth solving. A sharp addition: veracity is where data quality tooling attaches, and value is the question executives ask, so mentioning both shows you understand the whole stack rather than just the pipeline layer.
What is HDFS?
Answer: The Hadoop Distributed File System: it splits large files into blocks, replicates each block across several machines, and keeps the metadata map in a single NameNode’s memory. It is built for sequential reads of big files on commodity hardware, not for random updates or millions of tiny files. The consequence to state: HDFS’s design assumptions, big blocks and append-mostly writes, explain most of its operational quirks, which is a common opening among beginner big data interview questions.
How big is a block in HDFS, and why so large?
Answer: 128 MB by default, configurable through dfs.blocksize and sometimes set to 256 MB. Large blocks amortize the fixed cost of opening and locating a file, keep the number of blocks, and therefore NameNode metadata, small, and give each disk read a large sequential run. A file smaller than one block still occupies one block of metadata but only its real bytes of storage. This one setting explains replication layout, split sizing in compute jobs, and the small files problem in a single breath, which is why big data interview questions keep returning to it.
What do the NameNode and DataNodes do?
Answer: The NameNode is the metadata brain: it holds the filesystem namespace, which blocks belong to which file, and where replicas live, all in memory. DataNodes store and serve actual blocks and send the NameNode regular heartbeats and block reports. If the NameNode dies, the cluster is unreadable, which is why production deployments run a highly available pair. Name it plainly and add the heartbeat dependency, because that pairing is the correct answer shape for this question.
Why does HDFS replicate blocks, and how many copies by default?
Answer: Three replicas by default via dfs.replication, placed across different nodes and racks so a single machine or switch failure loses nothing. Replication also gives compute schedulers a chance to run tasks on a node holding the data. The caveat worth adding: cloud object stores replaced replication with erasure coding managed by the provider, which is one reason data platforms moved off HDFS. Replication versus erasure coding is a favorite contrast in big data interview questions about storage durability.
What is an object store, and how does it differ from HDFS?
Answer: An object store, like S3, GCS, or ADLS, keeps data as flat objects addressed by keys over HTTP, with durability handled by the provider and capacity effectively unlimited. HDFS keeps blocks on a coordinated cluster with a central metadata server and moves data locality with the data. The practical difference: object stores decouple storage from compute, so clusters can be ephemeral, but listing and renaming are weaker operations. That tradeoff is the core of modern big data interview questions about architecture.
What is MapReduce?
Answer: The original Hadoop processing model: a map phase runs over input splits producing key-value pairs, a shuffle groups them by key, and a reduce phase aggregates each group, with all intermediate data written to disk between phases. It made reliable cluster computing accessible but paid for every job with heavy disk I/O. Knowing it matters mostly as history now: it defines the vocabulary of stages, shuffles, and splits that Spark reused and made cheaper.
What is Apache Spark, in one sentence?
Answer: A distributed compute engine that runs SQL, DataFrame, streaming, and machine learning workloads across a cluster, holding intermediate data in memory instead of writing it to disk after every step. It is lazy: you build a plan, and execution waits for an action. This one sentence is the hinge of many big data interview questions, because everything else, stages, shuffles, caching, hangs off the ideas of in-memory execution and deferred planning.
Why is Spark faster than MapReduce?
Answer: Two honest reasons. First, Spark keeps intermediate results in executor memory rather than materializing every step to HDFS, which removes the dominant MapReduce cost. Second, it optimizes whole query plans up front, via the Catalyst optimizer, instead of composing fixed map and reduce templates. Avoid the myth that it is only about memory: the plan-level optimizations often matter as much. That correction, stated calmly, is a strong answer to one of the most persistent big data interview questions.
What is an RDD?
Answer: A resilient distributed dataset: Spark’s original abstraction, an immutable collection of records split into partitions across executors. RDDs track the lineage of operations that produced them, so any lost partition can be recomputed after a failure. They give you fine control over partitioning and transformations but no automatic query optimization, because the engine cannot see inside your functions. Say lineage out loud; that word unlocks the fault tolerance follow-up.
What is a DataFrame in Spark?
Answer: A distributed table: rows with named, typed columns, like a database table or a pandas frame but spread over a cluster. Because Spark knows the schema, it can optimize operations with Catalyst, push filters down to storage, and read only needed columns from columnar files. DataFrames replaced RDDs for everyday analytics because the engine optimizes what you mean rather than how you wrote it. That shift, intent over mechanics, is the pattern big data interview questions reward when comparing the two APIs.
What is the difference between a transformation and an action?
Answer: Transformations, like filter, select, and groupBy, define a new DataFrame from an existing one and run nothing; actions, like count(), collect(), and write, trigger execution of the whole plan. This split is called lazy evaluation, and it lets Spark optimize across your entire chain of transformations before spending a single task. Answering with the word lazy plus one example is the exact shape interviewers want.
What does lazy evaluation actually buy you?
Answer: Plan-level optimization and fault tolerance. Because nothing runs until an action, Spark sees the full chain, pushes filters toward storage, prunes columns, picks join strategies, and can fuse narrow operations so intermediate rows never hit disk. Lineage tracking falls out of the same design: the plan is a recipe, so any lost partition can be recomputed. The tradeoff is debugging opacity, errors surface only at action time, which is the caveat that rounds out a complete answer.
What is batch processing?
Answer: Computing over a fixed, bounded dataset in one scheduled run: nightly aggregates, hourly refreshes, backfills of history. Batch optimizes for throughput over latency, treats failures by rerunning, and is usually orchestrated by a scheduler like Airflow. Most reporting and modeling is still batch because most business decisions tolerate minutes or hours of delay. Naming a concrete example, like a nightly revenue table, grounds this answer and sets up streaming contrasts later in big data interview questions.
What is stream processing?
Answer: Computing over data that arrives continuously and has no end: click events, sensor readings, payment authorizations. The engine keeps state across events and produces results within seconds. Streaming’s defining difficulties are out-of-order arrivals and keeping that state bounded, which is why watermarks and windowing dominate streaming rounds. Add the latency framing, seconds instead of hours, and you have the complete one-breath definition.
Batch or streaming: how do you choose for a new workload?
Answer: Ask what happens if a result is an hour stale. If nothing bad happens, build batch, because it is simpler, cheaper, and easier to make correct and idempotent. If the answer drives action within seconds, fraud checks, alerting, live personalization, pay the streaming complexity tax. Many teams land on a lambda-free middle: streaming for speed with a periodic batch reconciliation. That decision rule, staleness first, is exactly what interviewers listen for when big data interview questions pose this choice.
What is a data warehouse?
Answer: A managed system that stores data in a modeled, schema-on-write form and runs analytical SQL against it with strong guarantees: think Snowflake, BigQuery, Redshift. Storage and compute are tuned for each other, so queries are fast and transactions are consistent. The costs are the price and the modeling discipline required up front. Interviewers expect you to pair this definition with its lake counterpart, because the comparison is where architecture rounds begin.
What is a data lake?
Answer: A large repository of raw data in open file formats on cheap storage, usually an object store: everything lands in its original shape, and structure is applied when you read it, schema on read. Lakes are inexpensive and flexible; their historical weaknesses were no transactions, no enforcement, and slow planning over millions of files. Those weaknesses are precisely what lakehouse table formats were built to fix, which is the arc big data interview questions want you to sketch before anyone even asks.
Lake versus warehouse: what is the difference in one sentence?
Answer: A lake stores raw, open-format data cheaply with schema on read, while a warehouse stores modeled, governed data expensively with schema on write and much faster SQL. The follow-up almost always asks where each is the wrong choice: warehouses choke on cheap retention of odd-shaped raw data, lakes struggle with concurrent, transactional analytics. Delivering both halves in one breath is the standard that big data interview questions set for this comparison.
What is a data lakehouse?
Answer: A lake plus a table format layer, Delta Lake, Iceberg, or Hudi, that adds database behaviors to open files: ACID transactions between writers, schema evolution, time travel, and fast planning through metadata manifests. You keep object-storage economics and engine choice, and you get warehouse-grade reliability for the tables that matter. Saying that the transaction log is the enabling piece shows you understand the mechanism, not just the marketing, which is the credibility mark this answer needs.
What is Parquet, and why do pipelines prefer it?
Answer: A columnar file format: values are stored one column at a time, compressed well, and readable in chunks. Analytics reads a few columns out of many, so columnar layout means you scan bytes only for what you touched, often ten times less than row formats. It also stores min and max statistics per chunk, letting engines skip whole blocks of data. Parquet’s dominance is such that big data interview questions treat it as assumed knowledge, so be ready to say why columnar wins for scans but loses for row-level lookups.
Columnar versus row formats: what actually differs?
Answer: Row formats like Avro or CSV store a record’s fields together, so reading one whole record is cheap but scanning one column across billions of rows means reading everything. Columnar formats like Parquet and ORC store each column’s values together, so scans read only the referenced columns, and similar values compress better side by side. Analytics is scan-shaped, which is why columnar won there, while event pipelines that replay whole records still like row formats. Know one example of each and this question closes fast.
What is Avro, and when is it a good choice?
Answer: A row-oriented binary format that travels with its schema, stored as JSON, and supports clean schema evolution rules between versions. It is compact and splittable, which made it the default landing-zone and Kafka payload format: every message or file carries everything needed to interpret it later. Choose Avro when records flow end to end and evolve over time; choose Parquet when queries will scan columns. Picking formats by workload is the reasoning this question tests.
What is partitioning in a lake table?
Answer: Physically grouping data into directories by a column’s value, like dt=2026-09-26, so queries that filter on that column read only matching directories, which is called partition pruning. Done well, a day-scoped query touches one partition instead of the whole table. Done badly, too many partitions create millions of tiny files that slow everything down. Partitioning choices ripple through every performance question that follows, which is why big data interview questions introduce it early and return to it often.
What is ETL?
Answer: Extract, transform, load: pull data from sources, reshape, cleanse, and join it in a compute layer, then write the finished result into a target like a warehouse. The transformations happen before the data lands, so the target is clean and modeled but the raw shape is lost. ETL fits when the transformation logic is well understood and compute is expensive where you would land the data. Naming when it fits, not just what it is, lifts this answer above the parroted version.
What is ELT, and why has it become popular?
Answer: Extract, load, transform: land the raw data first, then transform it inside the target system using its own compute, as dbt-style SQL projects do. It became popular because cloud warehouses made compute cheap and elastic, and because keeping raw data in place makes mistakes recoverable: you reprocess the raw copy instead of re-extracting from a source you may no longer control. That recoverability argument is the sentence big data interview questions listen for on this topic.
What is a DAG in the orchestration sense?
Answer: A directed acyclic graph: tasks as nodes and dependencies as edges, declaring what must complete before what, with no cycles because a pipeline that loops can never finish. Schedulers like Airflow read the DAG, topologically order the tasks, and run independent branches in parallel. The acyclic property is also a modeling discipline: each task consumes defined inputs and produces defined outputs, which is what makes pipelines reason-able. Acyclicity is the word that proves understanding in scheduling rounds.
What is Apache Airflow?
Answer: The dominant open-source workflow orchestrator: pipelines are defined as Python DAGs, a scheduler turns them into timestamped runs, and an executor distributes tasks to workers. It handles scheduling, retries, dependency ordering, backfills of history, and visibility into what ran when. Airflow orchestrates; it does not move data itself, and conflating those two roles is the classic beginner tell. Keeping the boundary crisp is a reliable way to stand out early in big data interview questions.
What does a scheduler do for a data platform?
Answer: It turns pipelines into time- and dependency-driven runs: fire this DAG daily at 02:00, wait for upstream tables, retry failures with backoff, alert when SLAs slip. Without one, cron scripts accumulate hidden dependencies and no one can answer what ran, what failed, or what is stale. Modern schedulers also express data-aware triggers, running a consumer the moment an upstream table updates. Describing the observability role, not just the firing role, is what makes this answer complete.
What is data skew, at a definition level?
Answer: Uneven distribution of work across partitions: when a few keys hold most of the rows, the tasks handling those keys take far longer than the rest, and the whole stage waits on them. Classic cases are one tenant with enormous volume in a multi-tenant table, or null keys that all hash to one partition. The consequence is simple: cluster utilization collapses to the speed of one task. Skew appears in big data interview questions at every tier, so have a real example ready to describe.
What is the small files problem?
Answer: Analytical storage works best with large files, and it degrades when a table holds millions of tiny ones: every file costs metadata on HDFS, a listing request on object stores, and often a scheduler task, so planning and job start times balloon. It usually comes from writing per partition per batch without consolidation, or from streaming jobs committing every few seconds. Knowing both the cause and the fix, compaction, is expected at every level of big data interview questions.
What is a shuffle, conceptually?
Answer: The redistribution of data across the cluster so that records with the same key end up on the same executor, which is what groupBy, joins, and distinct all require. Between writing shuffle output to local disk and fetching it over the network, it is the most expensive thing a distributed job does. Much of performance tuning is simply doing fewer, smaller shuffles. That cost framing is precisely the takeaway interviewers want when this word appears.
What is the difference between event time and processing time?
Answer: Event time is when the thing actually happened, stamped by the producing device; processing time is when your system saw it. Mobile networks, retries, and batching guarantee these differ, sometimes by minutes or hours. Analytics that cares about reality, like revenue by day, must use event time and therefore must handle late arrivals. Stating the guarantee of disorder, not just the definitions, is the detail that makes this answer memorable.
What is a window in stream processing?
Answer: A bounded slice of event time that unbounded streams get grouped into so aggregations become finite: count the clicks between 10:00 and 10:10. Tumbling windows are fixed and non-overlapping, sliding windows overlap, and session windows group activity separated by gaps of silence. Windows are also where state management lives, because the engine must hold partial aggregates until the window closes. Describing one concrete windowed metric is the cleanest way to answer it.
What is schema on read versus schema on write?
Answer: Schema on write validates and types data as it lands, which is how warehouses work: mistakes are rejected at the door and the store inside is trustworthy. Schema on read applies structure only when someone queries, which is how raw lakes work: ingestion is fast and nothing is rejected, but quality problems hide until read time. Most real platforms use both: schema on read for landing, schema on write for published tables. Framing them as stages, not enemies, matches how interviewers expect practitioners to think.
What do structured, semi-structured, and unstructured mean?
Answer: Structured data fits a fixed schema: rows and typed columns. Semi-structured carries its own flexible structure, JSON with varying fields, XML, logs. Unstructured has no machine-readable schema: images, audio, free text, PDFs. The practical mapping matters: warehouses handle the first, lakes and document stores handle the second, and object storage plus ML pipelines handle the third. Mapping each class to the system that handles it well is the completeness this answer needs.
What is scale out, and why is it the defining move of big data systems?
Answer: Scale out means adding more machines instead of building one bigger machine, because beyond a point more cores and RAM in one box cost exponentially more than spreading work across commodity nodes. Distributed systems get near-linear capacity, but inherit coordination problems: partial failure, network partitions, and stragglers. Every technology in this bank, HDFS, Spark, Kafka, exists to manage that trade. Saying the trade in both directions is the maturity signal this tier listens for.
Intermediate big data interview questions
This tier is where big data interview questions stop testing vocabulary and start testing mechanism. Forty questions follow, and the pattern to internalize is component, then consequence: name the piece that owns the behavior, then explain what it does under load. That second half is what separates operators from engineers in an interviewer’s notes, and it is the habit that makes the scenario tier of big data interview questions tractable later.
Walk me through what happens when a client reads a file from HDFS.
Answer: The client asks the NameNode for the file’s block locations, receiving a list ordered by proximity to the reader, then reads block data directly from the DataNodes themselves, in parallel where the file spans blocks. The NameNode never serves bytes; it only serves metadata, which keeps it off the data path. If a DataNode is unreachable, the client fails over to the next replica transparently. Saying metadata plane versus data plane is the phrase interviewers listen for on this path.
And the write path: what happens when a file lands in HDFS?
Answer: The client asks the NameNode to create the file, then streams data through a pipeline of DataNodes: it writes the block to the first node, which forwards it to the second, which forwards it to the third, and acknowledgments flow back up the pipeline. The NameNode commits only after enough replicas acknowledge. Writes are append-mostly, files are immutable once closed, and consistency during writing is managed through leases. Replication during write, not after, is the mechanism detail that earns the point here.
How does NameNode high availability work?
Answer: An active and a standby NameNode share the edit log through a quorum of JournalNodes, and standby keeps its in-memory metadata warm by replaying that log continuously. DataNodes send block reports to both, and ZooKeeper-based failover controller fencing ensures only one is active. On failover, in-progress leases are invalidated and clients retry against the new active. Cold-start from a checkpoint alone would take far longer, which is the operational why behind the JournalNode design that big data interview questions want stated.
Where does YARN fit around Spark, and when is it irrelevant?
Answer: YARN is the cluster resource manager: the ResourceManager arbitrates containers across nodes, NodeManagers launch them locally, and Spark’s ApplicationMaster negotiates executor memory and vcores for your job. Spark also runs on Kubernetes or its own standalone manager, and on Kubernetes the same negotiation happens through the scheduler interface. The consequence of resource management done wrong is queue starvation and pending containers, visible in the YARN UI. Frame YARN as the landlord and Spark as the tenant, and big data interview questions on resource contention land cleanly.
What is the difference between the driver and executors?
Answer: The driver is the coordinator: it runs your main program, builds and optimizes the DAG, schedules stages, and tracks task results. Executors are the workers: each runs tasks on its partitions, stores cached blocks and shuffle files, and reports metrics back. A driver bottleneck shows as long scheduling or planning times even when executors sit idle; an executor bottleneck shows as straggler tasks. Knowing which side owns planning versus execution is what big data interview questions check with this pairing.
RDD, DataFrame, Dataset: which do you reach for and when?
Answer: DataFrames for anything expressible in SQL-like operations, because Catalyst optimizes them and storage pushdowns apply; Datasets when you want compile-time type safety in Scala or Java while keeping those optimizations; raw RDDs only for custom partitioning, unstructured data, or transformations the engine cannot see into, like complex per-record logic. The cost of dropping to RDD is losing plan-level optimization for that part of the flow. Escalate downward only when the higher API cannot express the need, which is the judgment being scored here.
What does the Catalyst optimizer actually do to your query?
Answer: It rewrites your DataFrame operations as a logical plan, applies rule-based passes, predicate pushdown, column pruning, constant folding, then uses table statistics for cost-based choices like join reordering and strategy selection, and finally emits a physical plan, with whole-stage codegen fusing operators into compiled functions. The proof you can see: df.explain(true) prints every stage of that transformation. Naming one optimization you have watched happen in an explain plan turns this from textbook to experience in big data interview questions.
What makes a transformation narrow versus wide?
Answer: Narrow transformations, filter, select, mapPartitions, need only one input partition to produce each output partition, so they pipeline with no data movement. Wide transformations, groupBy, joins, distinct, repartition, need records redistributed by key across executors, which is the shuffle. The classification matters because narrow ops are nearly free and fuse together, while every wide op is a stage boundary with disk and network cost. Counting wide ops in a plan is the fastest performance estimate big data interview questions expect you to make.
How do stages, tasks, and the shuffle boundary fit together?
Answer: Spark cuts the physical plan into stages at every shuffle boundary. Within a stage, tasks are one per partition and pipeline all the narrow operations between boundaries, so intermediate rows stay in memory. A stage cannot start until every task of its parent finishes, because the shuffle must be fully written before any consumer can fetch its partition. That barrier is also why one straggler task delays the entire next stage, which connects this answer directly to the skew questions later in big data interview questions.
How does Spark decide partition counts, and how do you control them?
Answer: Input partitions follow the storage layout, roughly one task per file or block, while post-shuffle partitions come from spark.sql.shuffle.partitions, 200 by default, a static value that is wrong for most jobs: too many tiny tasks for small data, too few huge tasks for large data. You control it per session, or better, leave it high and let AQE coalesce at runtime, and maxRecordsPerFile caps output file sizes. Naming the default and why it is wrong is the credibility marker this answer needs.
What is the difference between repartition and coalesce?
Answer: repartition(n) performs a full shuffle to produce exactly n evenly sized partitions and can increase or decrease their count; coalesce(n) only merges existing partitions, avoiding the shuffle but potentially leaving the stage before it with a few overloaded tasks. Use repartition when you need balanced output files, coalesce just before a write when collapsing many small partitions into fewer. The classic bug is coalescing to one before a large write and serializing the whole job. Choosing between them by direction of change is what this question grades.
What is a broadcast join, and when does it win?
Answer: The small table is collected, shipped to every executor, and held in memory, so the large side never shuffles at all: the most expensive part of the join disappears. It wins when one side fits comfortably in executor memory, guided by spark.sql.autoBroadcastJoinThreshold, 10 MB by default, or forced with broadcast(df). It loses when the estimate is wrong and a large table gets broadcast, causing driver and executor memory failures. Checking the plan for BroadcastHashJoin versus SortMergeJoin is the verification habit big data interview questions want described.
Sort-merge join versus shuffle hash join: how do they differ?
Answer: Both shuffle both sides by the join key first. Sort-merge then sorts each partition and merges in order, which spills gracefully to disk and scales to any size, making it the default for large-to-large joins. Shuffle hash builds an in-memory hash table of one side per partition and probes with the other, skipping the sort, faster when the build side truly fits in memory. AQE can switch strategies at runtime when actual sizes differ from estimates. Explaining the memory-versus-sort tradeoff is the depth this comparison deserves.
What does Adaptive Query Execution change at runtime?
Answer: Spark 3’s AQE re-plans as shuffle stages complete, using real row counts instead of estimates: it coalesces post-shuffle partitions that came out too small, converts sort-merge joins to broadcast joins when a side turns out small enough, and splits skewed partitions in sort-merge joins so no single task dominates. It is on by default since Spark 3.2 via spark.sql.adaptive.enabled. The caveat: it only optimizes across shuffle boundaries, so plans without exchanges benefit little. Cite the specific behaviors rather than the buzzword.
What is salting, and when do you reach for it?
Answer: Salting defeats skew by adding a random suffix to a hot key, splitting one giant partition into several ordinary ones: concat(user_id, floor(rand()*8)) on the large side, with the small side replicated eight times per key so the join still matches. Aggregations take two passes, first by salted key, then a final combine. Reach for it when one key holds an extreme share and broadcast is impossible. Saying when not to, it multiplies data and complicates logic, is the judgment that earns the follow-up question.
What do cache and persist do, and how do storage levels differ?
Answer: They materialize a DataFrame’s partitions in executor memory, or memory plus disk, so downstream actions skip recomputation; for DataFrames, cache() defaults to MEMORY_AND_DISK, spilling to disk rather than recomputing when memory fills. Levels trade CPU for footprint: memory-only is fastest, disk-only bounds memory use, and serialized variants shrink footprint at deserialization cost. Unpersist when done, because cached data also delays fault tolerance recomputation decisions. Naming the spill behavior is the operational detail that wins this answer.
How is checkpointing different from caching?
Answer: Caching keeps data close and discards it on executor loss, relying on lineage recompute; checkpointing writes the actual data to reliable storage and truncates the lineage, so recomputation after failure starts from the checkpoint, not the source. You set a checkpoint directory with setCheckpointDir and call checkpoint(), which is eager by default. It is the fix for exponentially long lineage in iterative algorithms and deep chained jobs. Cache is a performance tool, checkpoint is a correctness and recovery tool, and that framing answers this item in big data interview questions completely.
What is speculative execution?
Answer: When most tasks of a stage finish and a few straggle, Spark launches duplicate copies of the slow tasks on other executors and takes whichever copy finishes first, controlled by spark.speculation and its quantile and multiplier settings. It hides heterogenous node problems and transient slowness, but it duplicates work and shuffle writes, so it is a bandage, not a fix: a persistent straggler usually means skew or a bad node that needs its own investigation. Stating the bandage caveat first is what makes this answer sound experienced.
What is inside a Parquet file that makes queries fast?
Answer: A hierarchy: row groups of roughly 128 MB, each holding column chunks, which hold pages with min and max statistics, plus dictionary and run-length encodings that shrink repeated values, and a footer carrying the schema and those statistics. Engines read the footer, prune row groups whose stats cannot match the filter, then read only the requested column chunks, compressed with snappy or zstd. That three-level pruning, row group, column, page, is the mechanism answer big data interview questions want, not just the word columnar.
What do predicate and projection pushdown mean with Parquet?
Answer: Predicate pushdown moves filters to the storage layer: the engine reads footers and skips row groups whose min and max ranges exclude the filter, never fetching those bytes. Projection pushdown reads only the columns the query references, which is the columnar payoff: a five-column filter over 200 columns touches a fortieth of the file. Both show up in a physical plan as pushed filters and column counts. Verifying both in explain output is the habit that reads as real experience.
ORC versus Parquet: how do you choose?
Answer: Both are columnar with statistics and encodings. ORC’s stripes carry lightweight row indexes for finer skipping and it historically anchors Hive and Hive-ACID deployments; Parquet is the lingua franca of Spark, Impala, and most lakehouse formats, with the broadest engine support. Compression ratios are close enough that ecosystem fit decides: new Spark and lakehouse work lands on Parquet, existing Hive estates stay ORC. Saying compatibility beats microbenchmarks is the pragmatic note this comparison deserves.
Partitioning versus bucketing: what does each actually buy?
Answer: Partitioning splits data into directories by column value and buys pruning: queries filtering that column skip unrelated directories entirely. Bucketing hashes a column into a fixed number of files per partition and buys shuffle avoidance: joins and aggregations on the bucket column can pair matching files without a full exchange. Too many partitions create small files; bucket counts are fixed at write time and hard to change. Pruning versus pre-shuffling is the one-line distinction to deliver, with the failure mode of each.
How do you choose partition columns for a lake table?
Answer: Pick columns that appear in most query filters, have moderate cardinality, and partition no finer than data volume supports: aim for partitions that hold hundreds of megabytes to gigabytes, not megabytes. Date is the classic choice because time-scoped queries dominate analytics; a low-cardinality region or tenant column can nest inside it. High-cardinality keys like user_id as partitions guarantee the small files problem. Sizing math first, cardinality second, is the order to reason through out loud.
What is the Hive metastore’s role, and what depends on it?
Answer: It is the central catalog: databases, tables, schemas, storage locations, and, for Hive-style tables, the partition listing. Spark, Trino, Presto, and Flink all resolve tables through it, so a metastore outage halts planning cluster-wide even though data files are intact. Cloud platforms substitute managed catalogs like AWS Glue with the same contract. Explaining that it holds metadata, never data, and that table formats are replacing its partition-listing role with manifests, is the current-edge framing that rewards you.
What do Delta Lake, Iceberg, and Hudi add to plain Parquet files?
Answer: A transaction layer over the files: Delta keeps a JSON commit log in _delta_log, Iceberg maintains a tree of metadata and manifest files pointing at snapshots, Hudi keeps a timeline with copy-on-write or merge-on-read behavior. On top come ACID commits for concurrent writers, schema evolution, time travel, and fast planning via file lists instead of directory listings. The files themselves stay Parquet, so every engine can still read them. Naming the log as the enabling component is the core of this answer in big data interview questions.
What is time travel in a table format, and how does it work?
Answer: Every commit creates a new snapshot, and old snapshots remain readable until explicitly expired: SELECT * FROM t VERSION AS OF 42 in Delta or FOR TIMESTAMP AS OF in Iceberg resolves the file list that snapshot’s metadata pointed at. Files referenced only by older snapshots are not deleted until retention jobs run, which is what makes rollback and reproducible backfills trivial. The caveat: snapshots and their files cost storage until expiry, so retention policy is part of the design. Query syntax plus retention caveat is the complete shape for this answer.
Why do lake tables need compaction, and how does it work?
Answer: Every write commit adds files, and streaming or high-frequency batch jobs add many small ones: planning slows because engines must consider every file, and each file becomes a task, so job start overhead climbs. Compaction rewrites small files into fewer large ones: OPTIMIZE in Delta, rewrite_data_files in Iceberg, typically targeting files under a threshold within chosen partitions. Table formats make this safe because old files stay valid for open snapshots until vacuumed. Compaction as scheduled maintenance, not emergency surgery, is the posture big data interview questions want you to describe.
What do VACUUM and expire_snapshots actually do?
Answer: Compaction and overwrites leave old files behind, referenced only by expired snapshots; VACUUM in Delta and expire_snapshots in Iceberg delete those unreachable files, reclaiming storage. Retention guards correctness: Delta refuses to vacuum inside seven days by default, because a reader with an old snapshot would lose its data mid-query. Running vacuum too aggressively breaks time travel and long-running readers, while never running it means storage grows forever. Explaining that pairing, unreachable versus retained, is the precision big data interview questions listen for on lifecycle management.
How does Structured Streaming achieve exactly-once output?
Answer: The engine records source offsets and commit progress in a checkpoint location, so after a failure it resumes from the last committed batch and reprocesses only uncommitted input. That gives exactly-once only if the sink is idempotent or transactional: Delta and Iceberg commits are transactional, foreachBatch becomes exactly-once when the batch logic uses MERGE keyed on unique identifiers. Replayable source plus idempotent sink plus checkpoint is the whole formula. Interviewers probe the sink half, because the checkpoint alone guarantees at-least-once, which is the trap in this item of big data interview questions.
What are the output modes of Structured Streaming, and when does each apply?
Answer: Append emits only finalized rows once, which is the mode for windowed aggregations, and windows finalize when the watermark passes their end. Update emits every row that changed since the last trigger, good for live upserts into a keyed store. Complete rewrites the whole aggregation result each trigger, practical only for small results like top-k dashboards. Append plus watermark is the combination that keeps state bounded, and knowing why is what the follow-up digs for.
How do tumbling, sliding, and session windows differ mechanically?
Answer: Tumbling windows are fixed and non-overlapping: every event lands in exactly one window, and state per window is one partial aggregate. Sliding windows fire on a schedule finer than their duration, so an event contributes to multiple overlapping windows and state multiplies accordingly. Session windows have no fixed size: they group events separated by gaps under a threshold and merge sessions that grow together, which requires mergeable aggregates. State size, not the definition, is the dimension interviews actually grade on windowing.
How does a watermark work, mechanically?
Answer: The engine tracks the maximum event time seen and defines the watermark as that maximum minus a configured delay: withWatermark("ts", "10 minutes"). The watermark advances as data arrives, and a window is finalized when the watermark passes its end, at which point its state is dropped and late data beyond it is discarded or routed to a side output. Too short a delay drops legitimate late events; too long bloats state. The watermark is a memory policy as much as a correctness policy, and that sentence is what earns the point here.
Compare at-most-once, at-least-once, and exactly-once semantics.
Answer: At-most-once acknowledges nothing until after processing, so failures lose data; at-least-once acknowledges after durable receipt and replays after failure, so failures duplicate data; exactly-once makes replays invisible by tying processing to atomic offset commits and idempotent or transactional sinks. Each level costs complexity, and the honest engineering answer matches the level to the tolerance of the consumer: a metrics counter tolerates at-least-once, billing does not. Matching semantics to consumer tolerance, not maximizing them by default, is the judgment being scored.
How do systems classify and handle late-arriving events?
Answer: Events are judged by their event time against the watermark: within the allowed lateness window, they update their still-open window or partition normally; between window close and retention limits, table formats can still MERGE corrections into closed results; beyond that, they route to a side output or dead-letter path for batch reconciliation. The design choice is where the cutoff sits, because every minute of allowed lateness is state held in memory. Reclassifying by age, open, correctable, reconciled, is the framework to articulate out loud.
How do Kafka partitions relate to Spark partitions in a streaming job?
Answer: Each micro-batch reads up to one Spark task per Kafka partition, so source parallelism is capped by the topic’s partition count: a six-partition topic cannot feed sixty busy readers no matter how many executors you own. After the first shuffle, spark.sql.shuffle.partitions governs parallelism independently, and stateful operations bind that parallelism to state layout, so changing it later forces state migration. Size the topic for peak throughput early. The cap on the source side is the insight most answers miss.
How does schema evolution stay safe across pipeline versions?
Answer: Through compatibility rules checked at a registry: backward compatibility means new schemas can read old data, which consumers need, forward means old readers survive new data, and full is both. Avro records reader and writer schema and resolves fields by name and default values; Parquet resolves by column names, so adds and drops are safe while type changes need care. Contract the change before shipping: add nullable columns, never repurpose fields, version when breaking. The registry-as-gatekeeper model is what this answer must name.
What is an Airflow sensor, and how should it wait correctly?
Answer: A sensor is a task that waits for an external condition: a file landing, a partition appearing, a upstream DAG finishing, polling until true or timing out. The operational trap is default poke mode, which holds a worker slot while sleeping; mode="reschedule" frees the slot between pokes, and deferrable operators go further, handing the wait to a triggerer process. Sensors should bound their wait with timeout and fail loudly. Reschedule mode is the detail that separates operators from admins.
What makes a DAG idempotent and backfill-safe?
Answer: Its tasks must write outputs as pure functions of their logical date: partition-scoped INSERT OVERWRITE or MERGE keyed on the period, never blind appends, and no reads of wall-clock time that make reruns differ from first runs. Then a backfill is just clearing and rerunning a bounded task range, because rewriting the same partitions twice yields the same result. Side effects outside the warehouse, sends, API calls, need deduplication keys. Deterministic output per logical date is the one-sentence standard to quote.
How does Airflow scheduling actually decide when a run happens?
Answer: Each DAG declares a schedule and gets runs stamped with a logical date, the interval the run covers, not when it executes: a daily DAG with data through midnight runs shortly after that midnight, covering the finished day. With catchup=True, the scheduler materializes every missed interval from the start date, which is how historical backfills fall out of the same mechanism; False skips gaps. Data-aware scheduling with datasets triggers runs when upstream outputs update instead of by clock. Explaining the interval-versus-execution distinction is the detail this answer is graded on.
How do you test a data pipeline before it breaks production?
Answer: In layers: unit tests on transformation logic with fixed fixtures, contract tests that pin schema and nullability at boundaries, expectation checks on the data itself, uniqueness, not-null, accepted ranges, row-count deltas versus history, run by frameworks like Great Expectations or dbt tests at pipeline gates, and freshness monitors on arrival times. The design decision is blocking versus alerting: block on primary keys and money columns, quarantine and warn on cosmetic issues. Expectations-as-code in CI is the modern answer interviewers listen for.
Scenario and troubleshooting big data interview questions
This tier is how scenario rounds actually feel: one symptom sentence, then the interviewer goes quiet while you think out loud. For every item below, the graded skill is the same: state your order of checks and the reasoning behind each step, then name the fix and its blast radius. Silence plus random knob-turning loses to a spoken diagnostic plan almost every time, and that plan is what these big data interview questions are really measuring.
A Spark job dies with executors killed by YARN for exceeding memory limits, and stages show gigabytes of shuffle spill. What is your sequence?
Answer: First, read the failing container’s exit and diagnostics in the YARN UI to confirm it is memory overhead, not a heap exception. Second, open the Spark UI stage that spilled and check spill size, shuffle read, and whether one task is an outlier, which would make this skew, not sizing. Third, act in order of leverage: broadcast the small join side if possible, enable or verify AQE so skew partitions split, then raise spark.executor.memoryOverhead and executor memory together, since off-heap shuffle and string-heavy workloads live in overhead. Raising partitions slightly can also shrink per-task buffers. Memory first, skew second, knobs last, is the order this scenario rewards, and it is among the most common scenario big data interview questions for good reason.
The nightly job that took 40 minutes now takes four hours. Where do you look first?
Answer: In order: the scheduler history to confirm what changed first, code, data volume, or environment; then input volume per partition, because silent data growth is the most common innocent cause; then the query plan for lost pruning, a changed partition column or a filter that no longer pushes down; then task-level timing for skew or a stage that now spills; finally cluster metrics for contention from a neighbor workload. Compare plans between a good run and today’s using saved explain output if you have it. Most 6x regressions are volume, pruning, or skew in that order, and narrating the comparison out loud is the discipline big data interview questions at this tier grade.
One task in a stage runs 30 minutes while its 199 siblings finish in two. What do you do?
Answer: Diagnose before fixing. Open the stage in the Spark UI, confirm the slow task’s shuffle read dwarfs the median, and identify the key with df.groupBy("key").count().orderBy(desc("count")). Then choose by shape: if one side of the join is small, broadcast it and the shuffle disappears; if AQE is available, enable skew join handling so the oversized partition splits; otherwise salt the hot key on the large side and replicate the small side per salt. Fixing utilization, not the task, is the point: the cluster idles while one task finishes, and that is the sentence skew-flavored big data interview questions want spoken.
After a traffic spike, yesterday’s dashboard undercounts events. What happened and what do you fix?
Answer: This smells like late-arriving data crossing the watermark. Check, in order: the watermark delay configured on the aggregation, whether the spike increased producer-side batching lag so events arrived beyond it, and the dead-letter or drop metrics if the engine reports them. Then fix in layers: raise allowed lateness for the affected windows and reprocess the affected range from the replayable source, route beyond-watermark events to a side output for batch reconciliation instead of dropping them, and alert on the reconciliation delta. The design lesson to state, and the one late-data big data interview questions chase toward: a watermark is a latency-versus-completeness dial, and the spike moved real lateness past your setting.
A bug corrupted six months of a fact table. Walk me through the backfill.
Answer: Freeze downstream consumers first, or at least announce the recompute window. Then verify the fix is deployed and provably correct on one partition before touching history. Backfill partition by partition, oldest or newest first depending on downstream tolerance, writing with partition overwrite or MERGE keyed on the period so reruns are idempotent, and validate each partition with row counts and checksums against expectations before proceeding. Recompute or mark stale every derived table that read the corrupted range, because forgotten dependents are where backfills really fail. Throttle concurrency so the backfill does not starve production queues. Partition-scoped idempotency is the phrase big data interview questions want to hear close this answer.
Queries against a lake table slowed down over months, and nobody changed the SQL. Diagnose.
Answer: Work the plan first: run one representative query with explain or a profile, and read how many files and partitions it actually touches versus what pruning should allow. Then count files and sizes in the touched partitions; tables accumulating streaming or five-minute commits usually hold thousands of small files, and planning plus task overhead dominates. Check the table format’s metadata health, manifest growth in Iceberg, commit log length in Delta, and whether compaction has ever run. Then fix in order: compact the hot partitions, cluster or z-order on the common filter columns, refresh statistics, and put compaction on a schedule so it never regresses. The diagnosis is almost always file count, and saying that first is what lake-performance big data interview questions reward.
A join returned ten times more rows than the source tables justify. What is your order of checks?
Answer: Duplicate keys on one side create a fan-out, so verify that first: count rows and count distinct join keys on each side, then count distinct keys within the smaller side specifically. If keys are unique but totals still surprise, check for an accidental cross join from a join condition that optimizes away, and check null semantics, since null keys match nothing in equi-joins but explode in some join variants. Fix upstream if duplicates are the root cause, dropping duplicates or fixing the producer, rather than hiding them with distinct after the join. Quantifying the fan-out multiplier per key is the evidence that makes join-surprise big data interview questions conclusive rather than lucky.
Duplicate rows appeared in a warehouse table after a job retried mid-run. Why, and what is the durable fix?
Answer: The job appended partial results, failed, and the retry appended again: classic at-least-once behavior meeting a non-idempotent sink. Confirm by checking whether duplicates share the retry’s reprocessed range. Then fix the write contract, not the symptom: convert appends to partition-scoped overwrite or MERGE on natural keys and period, so a rerun replaces rather than adds; if a raw append zone is required, dedupe at the published layer with a window function keyed on event identifier plus version. Add a uniqueness expectation as a pipeline gate so regressions fail loudly. Idempotent writes are the durable answer big data interview questions want here, and rerunning the fixed job to prove zero duplicates is the closing move.
Your streaming job’s batch processing time keeps creeping past the trigger interval. What do you examine?
Answer: Open lastProgress and track, in order: inputRowsPerSecond versus processedRowsPerSecond to confirm it is capacity, not a burst; state size, because growing state with no watermark cleanup means windows or sessionization are leaking; and task skew within batches, one slow partition delaying every micro-batch. Then act on the largest lever: fix state with proper watermark and session timeouts, rebalance source partitions or shuffle partitions, move expensive per-row Python logic into pandas UDFs or native functions, and only then scale executors. Scaling a leaking state store just delays the wall. Naming state first separates candidates who have run streaming in production, and it is the opening move scenario big data interview questions on lag expect.
After an upgrade, a stable job now returns different numbers for the same input. What changed?
Answer: Hunt nondeterminism in order: session time zones, because a defaults change reassigns rows across day boundaries and is the most common silent cause; timestamp and parser behavior, since legacy time parser policies changed across Spark versions; sort stability, where results taken from unordered or weakly ordered data shift when physical plans change; and any UDF using random values or wall-clock time. Reproduce with a pinned golden dataset, diff row-level results, and bucket the diffs by partition or timestamp to find the pattern. Fix by pinning session time zone explicitly, using deterministic orderings with tiebreakers, and fixing seeds. Golden datasets are the tool that turns this mystery into a diff, which is why they anchor debugging questions inside big data interview questions.
Object storage bills doubled and queries are the suspects. How do you investigate?
Answer: Split the bill by operation class first: LIST and GET requests usually explode from small files and metadata-heavy planning, while bytes scanned explode from lost pruning or readers selecting whole wide tables. Then correlate: count files per table and per partition to find small-file offenders, and compare each query’s bytes-read in the engine profile against what pruning should allow. Fixes follow the diagnosis: compact, consolidate streaming commits with longer trigger intervals or foreachBatch, and partition or cluster on the columns every query filters. Cache hot tables where repeated scans pay for it. Attribution before optimization is the discipline this scenario tests.
Kafka consumer lag grows every day at peak hours. What is your diagnostic path?
Answer: Confirm capacity versus burst first: steady lag growth during peaks that never drains means throughput is short, while oscillating lag that drains means you are sized fine but spiky. Then check the ceiling: partition count bounds consumer parallelism, so six partitions cap you at six active consumers regardless of fleet size, and rebalancing thrash from flaky consumers makes it worse. Profile processing cost next, slow deserialization, per-record external calls, or a downstream sink that throttles. Fixes in order of preference: fix per-record cost, increase partitions with a repartition plan, tune fetch and poll parameters, then add consumers. Partition math before fleet scaling is the order this question rewards.
An upstream team adds a column and changes one field from string to long. Twelve downstream jobs break. What should have been in place, and what do you do now?
Answer: Stabilize first: version-pin the affected jobs to the old schema where the format allows, or add explicit casts in the landing layer so the type change stops propagating while you triage. Triage by dependency order, fixing the shared staging consumers before leaf consumers, and validate each against golden outputs. Then prevent the recurrence: publish a schema contract at the boundary with registered compatibility rules, so type changes require a major version and consumers get a migration window; land raw immutably so replays survive upstream evolution; and add contract tests to both sides of the interface. The blame-free lesson to narrate: the boundary lacked a contract, and twelve breakages prove it.
Half your daily partitions are missing rows, but every job shows green. How is that possible?
Answer: Green means the job ran, not that data arrived. Check, in order: source arrival, whether upstream emitted anything for those hours, using source-side counts rather than pipeline logs; filter semantics, a quietly over-matching where clause or a partition filter that selects the wrong window; and write mode, where overwrite with an empty input DataFrame happily writes empty partitions over good ones. The systemic fix is dual: treat zero-row partitions as an alerting condition with a threshold per table, and distinguish freshness from completeness in checks, because a table can be fresh and empty. That distinction is the point of half the freshness questions inside big data interview questions. Zero is a number, and monitoring it as one is the sentence this scenario exists to produce.
Events are landing in the wrong day partitions after daylight saving time changes. What went wrong?
Answer: Partition keys derived in local time drift at DST boundaries: an hour disappears in spring and repeats in autumn, and sessions get attributed to the wrong day. Confirm by sampling events near the boundary and comparing their UTC timestamp to their partition value. Fix the derivation first: compute partition keys from event-time timestamps in UTC, and render local days only at the presentation edge with an explicit zone. Reprocess the affected range with the corrected logic using partition overwrite so reruns are clean. Then decide deliberately how the business defines a day for local reporting, because the day a user lives in and the UTC day are different products, and saying so is the senior note here.
Your Spark driver keeps dying with out of memory while executors are fine. What are the likely causes and fixes?
Answer: The driver owns planning and results, so check in order: a collect() or toPandas() pulling a large result into one process, huge numbers of partitions making task scheduling metadata balloon, and broadcast build sides collected on the driver. Fixes map one to one: stream results or aggregate before collecting, cap partitions to sensible counts and let AQE coalesce, and check broadcast thresholds so big tables never build on the driver. Raise spark.driver.memory last, because it hides the design flaw instead of fixing it. Driver memory is a planning resource, and that framing is what this question is really testing.
Airflow tasks pile up in queued and the scheduler falls behind. What is happening?
Answer: Queued means claimed but not started, so check in order: pool and worker slot exhaustion, because a handful of long tasks or poke-mode sensors can hold every slot; scheduler loop health, parsing time in the logs, since hundreds of heavy DAGs can consume the scheduler’s cycle just importing code; and metadata database bloat, where months of run history slow every scheduler query. Fixes map directly: move sensors to reschedule or deferrable mode, enforce max_active_tasks and max_active_runs, split heavy top-level code out of DAG files, and prune history with the cleanup commands. Schedulers fail from self-inflicted load more than from job volume, and diagnosing in that order is the answer.
You inherit a table with no partitions, 200 columns, and slow everything. What is your improvement sequence?
Answer: Measure before touching: capture one week of query patterns, which columns filter, which are read, and current bytes scanned per query, because the right layout follows usage, not taste. Then apply in order of impact: partition on the dominant time filter if volume supports it, cluster or z-order on the top two filter columns inside partitions, convert to a transactional table format so future compaction and evolution are possible, and rewrite the write path with target file sizes so small files never accumulate. Validate with the same queries and compare bytes read and runtime. Layout follows workload, and saying you would measure first is what separates this answer from a list of features.
A data quality check fires at 03:00 and downstream consumers load at 06:00. Fail the pipeline or publish with warnings?
Answer: Decide by blast radius, and pre-decide it in the check’s severity, not at 03:00. Blocking checks belong on properties that corrupt joins or money: uniqueness of keys, not-null on foreign keys, referential integrity, and schema compatibility. Recoverable issues, like a modest null rate or a freshness delay within tolerance, publish with annotations and page a human, because blocking every wobble trains the team to ignore the pipeline. Whatever fires, quarantine the bad rows in an inspectable table so the fix can replay them, and make the decision matrix visible in the DAG code. The sentence to say out loud: severity is a design parameter, and this scenario checks whether you treat it as one.
A Spot fleet reclamation kills executors mid-job and the job restarts from scratch repeatedly. How do you make batch work on Spot?
Answer: Understand the loss model first: executor loss loses that executor’s shuffle files, and Spark recomputes lost partitions from lineage, which is why whole-stage recompute storms follow big reclaims. Then reduce blast radius: keep Spot for stateless batch and on-demand for the driver and any stateful streaming; enable external shuffle service or deploy on Kubernetes where shuffle fetches survive node loss; split giant jobs into staged writes to reliable storage so restart resumes near the failure; and check retry and reclamation budgets so a job cannot loop forever. Speculative execution helps stragglers but not mass reclaim, so sizing above the eviction rate matters more. Matching statefulness to instance class is the core sentence of this answer.
Two teams write the same table concurrently and one commit fails intermittently. What is going on and how do you fix it?
Answer: Table formats commit optimistically: both writers read the same snapshot, and only one wins the commit while the other retries against the new snapshot, failing if the conflict rule rejects it, as appends to the same partition often are. Confirm by reading the commit log’s conflict messages. Then separate the writers by contract: partition the table so each team owns disjoint partitions, route both through one scheduled writer, or move one team to a derived table so conflicts disappear structurally. Tune retry intervals last. Concurrent writes need ownership boundaries, not luck, and explaining the optimistic retry cycle is the mechanism this question wants.
Management wants the lake migrated from Hive tables to Iceberg without downtime. Sketch the plan.
Answer: Migrate per table behind an alias, not big bang. For each table: snapshot or migrate in place, which registers existing files as the base snapshot, then run dual reads during validation, comparing row counts, checksums on sampled partitions, and query results between old and new paths. Cut over readers via the catalog entry or view, keeping the old table read-only for rollback, and schedule compaction after cutover since the base snapshot inherits the old file layout with all its small files. Watch concurrent-write behavior and reader-version compatibility before enabling new features. Table by table with a rollback path is the safety property this scenario grades.
A key tenant’s volume grew 50x and now every shared job is slow. Whose problem is it and what do you do this week?
Answer: This is skew introduced by data growth, and the diagnostic order is: prove concentration with per-key counts and task timing, confirm shared jobs bottleneck on the stages touching that tenant, and rule out storage layout regressions from the same growth. This week, mitigate: isolate the tenant’s heaviest queries onto their own schedule or queue, apply AQE skew handling or salting in the shared jobs, and broadcast small reference joins to shrink the affected stages. This quarter, fix structurally: tenant-aware partitioning or clustering so the hot tenant prunes into its own files, and workload isolation with per-tenant queues and cost attribution. Prove, mitigate, restructure, is the arc interviewers want from this answer.
A Parquet write fails midway, and now readers see a partial table. Why is that possible and what do you change?
Answer: Plain files commit nothing: a writer that dies mid-directory leaves partial data visible to any path-scanning reader, which is the exact problem table formats exist to solve. Verify the exposure by listing the target directory against the expected commit manifest. The fix is structural: write through a table format so commits are atomic, either all files become visible or none; stage to a temporary location and rename atomically only where the store supports it; and have readers resolve tables through the catalog rather than raw paths, so no one ever sees the in-flight directory. Atomicity at commit time is the property to name, and path-based readers are the anti-pattern to call out.
Nobody trusts the numbers anymore. Two teams publish conflicting metrics for the same business question. How do you fix the platform?
Answer: Reconcile definitions before infrastructure: inventory both metrics, diff their SQL, and name the differences, filters, join grain, deduplication, time boundaries, because that diff is usually the entire dispute. Then make one definition load-bearing: a certified semantic layer or shared metrics model that both pipelines consume, with the raw variants deprecated on a published date. Add lineage so anyone can trace a dashboard number to its source, and tests on the certified metric so drift fails loudly instead of silently diverging. Disputes about numbers are disputes about definitions, and leading with that sentence, then showing the diff, is what this scenario is really testing.
Your compaction job itself is now the slowest job in the platform. What did you get wrong and how do you tune it?
Answer: Compaction was scoped without bounds: rewriting whole tables or unbounded partition lists reads and rewrites more than it saves. Diagnose by comparing bytes rewritten against actual small-file waste, then restrict the blast radius: target only partitions whose file counts and sizes cross thresholds, batch partitions per run with a schedule matched to arrival rate, and preserve sort order during rewrites so clustering is not lost. Cap concurrency so compaction does not starve production workloads, and let snapshot expiry follow so vacuum does not lag behind rewrites. Compaction is maintenance with its own cost model, and tuning it by measured waste rather than by calendar is the judgment this question scores.
Hands-on scenario labs
Reading answers builds vocabulary; building reflexes takes repetition, and the scenario tier of big data interview questions is graded on reflexes. Each lab below runs on a laptop with a local Spark install or a Dockerized Spark and Airflow. Do each three times: once with the checklist open, once from memory, once narrating out loud as if an interviewer were listening. That narration is exactly the rehearsal big data interview questions at scenario level reward.
Lab 1: manufacture and cure the small files problem
- Generate a dataset and write it badly on purpose:
spark.range(2000000).write.parquet("/tmp/lab/small"), then count the files withls /tmp/lab/small | wc -land note the listing time of a read. - Reread and check parallelism:
df = spark.read.parquet("/tmp/lab/small"), thenprint(df.rdd.getNumPartitions()), and watch how many tasks a trivialdf.count()spawns. - Repair with a repartition before write:
df.repartition(8).write.mode("overwrite").parquet("/tmp/lab/big"), and compare file counts and read times side by side. - Repeat the write with
.option("maxRecordsPerFile", 500000)and observe how output file count becomes predictable at scale. - Finish by writing the rule from memory: target file sizes in the hundreds of megabytes, and compaction on a schedule, not on an outage.
Lab 2: build skew, watch it, then salt it
- Create a skewed dataset:
spark.range(10000000).withColumn("k", when(rand() < 0.9, "hot").otherwise((rand()*1000).cast("int"))). - Aggregate and watch the UI: run
df.groupBy("k").count().collect(), open the Spark UI, and find the stage with one task taking most of the stage time. - Prove the concentration first:
df.groupBy("k").count().orderBy(desc("count")).show(5), and read the hot key’s share out loud. - Salt and aggregate in two passes: build
k2 = concat(k, lit("_"), (rand()*8).cast("int")), aggregate byk2, then aggregate those results byk. - Compare task timelines before and after in the UI, and state the tradeoff: more parallelism bought with duplicated shuffle volume.
Lab 3: run an Airflow backfill without double counting
- Define a tiny DAG with
schedule="@daily"andcatchup=True, whose task writes one day’s slice of a local table with partition overwrite. - Run it normally for a few logical dates, then delete a slice and simulate loss:
airflow tasks clear -s 2026-09-01 -e 2026-09-03 -t load lab_dag. - Rerun the cleared range with
airflow dags backfill -s 2026-09-01 -e 2026-09-03 lab_dag, and verify row counts before and after are identical. - Break idempotency on purpose by switching the write to append mode, rerun the same range, and count the duplicates you just manufactured.
- Restore overwrite, and write the one-sentence rule from memory: a task is backfill-safe when rerunning any range yields exactly one copy per event.
Cheat sheet: the commands behind the answers
Nearly every item in this bank of big data interview questions resolves to one of the commands or settings below, in the same order you would reach for them live. Learn the table, then attach one diagnostic sentence to each row, and you can walk a scenario round without improvising.
| Command or setting | What it tells you |
|---|---|
hdfs dfsadmin -report | Live DataNode inventory, capacity, and dead nodes; the HDFS opener |
hdfs fsck /data -files -blocks | Block placement, replication health, under-replicated files |
hdfs dfs -du -h /data | Which directories own the bytes |
hdfs getconf -confKey dfs.blocksize | The block size new files inherit, in bytes |
df.explain("formatted") | The physical plan: join strategy, exchanges, pushed filters |
df.rdd.getNumPartitions() | Actual parallelism before you blame the cluster |
spark.sql.shuffle.partitions | Post-shuffle task count; the 200 default is rarely right |
spark.sql.adaptive.enabled | AQE: runtime coalescing, join switching, skew splitting |
broadcast(small_df) | Force the shuffle-free join when one side is truly small |
df.groupBy("k").count().orderBy(desc("count")) | Skew check: does one key own the table |
spark.sparkContext.setCheckpointDir(...) + df.checkpoint() | Truncate runaway lineage before it slows recovery |
df.write.partitionBy("dt").option("maxRecordsPerFile", n) | Write-side layout: pruning today, file sizes under control |
query.lastProgress | Streaming health: input rate, processed rate, state size |
DESCRIBE HISTORY t / SELECT * FROM t.snapshots | Commit audit log for Delta and Iceberg |
SELECT * FROM t.files | Per-file counts and sizes: the small files verdict |
OPTIMIZE t / CALL cat.sys.rewrite_data_files(...) | Compact small files into large ones |
VACUUM t / CALL cat.sys.expire_snapshots(...) | Delete unreachable files once retention allows |
SELECT * FROM t VERSION AS OF n | Time travel: what changed, and rollback target |
parquet-tools meta file.parquet | Row groups, encodings, schema: what a read will touch |
EXPLAIN ANALYZE | The plan with actual row counts and timings |
airflow dags list-import-errors | Broken DAGs before they stall the scheduler |
airflow dags backfill -s DATE -e DATE dag | Bounded history rerun; only safe when tasks are idempotent |
yarn application -list / -kill | Queue state and the escape hatch for stuck jobs |
SHOW PARTITIONS t | Partition layout as the catalog sees it, versus on disk |
Engine documentation covers the rest of what big data interview questions assume: the Spark SQL and tuning guides at spark.apache.org, and the Iceberg maintenance reference at iceberg.apache.org explains every compaction and expiry procedure this table abbreviates.
Key takeaways and FAQ
The through-line of every tier above: big data interview questions reward people who pair a component with its consequence. Naming the mechanism alone reads as theory; quoting a knob alone reads as memorization; together they read as someone who has carried a production pipeline. Keep that pairing in every answer you rehearse, and this bank becomes a script for the entire loop.
How long should I prepare for big data interview questions?
With daily hands-on work, a focused week: two days speaking the beginner tier aloud, two on the intermediate mechanisms, one on scenarios, the weekend on the labs. Without regular cluster time, plan three to four weeks and run every lab yourself, because hands recall what eyes skim, and scenario-tier big data interview questions test recall under pressure.
Do big data interview questions require live coding in Spark?
Increasingly yes, and big data interview questions that code live usually stay on DataFrame transformations against a sample dataset rather than algorithm puzzles. Expect a filter, aggregate, join, and window function, plus explaining the plan you produced. Practicing in the labs above while narrating your reasoning is the single best rehearsal for that format.
Which Spark topics dominate big data interview questions?
Execution mechanics first: stages, shuffles, partitions, and join strategies, because they explain every performance conversation. AQE and adaptive behavior second, since it changed tuning advice. Caching and checkpoints third. If you can explain those five fluently with a real example each, you cover the majority of Spark rounds inside big data interview questions.
Are big data interview questions different for data engineers and analytics engineers?
The beginner tier of big data interview questions is identical; the depth moves. Data engineers get deeper on Spark mechanics, streaming, and storage internals, while analytics engineers get deeper on SQL modeling, warehouse semantics, and orchestration hygiene. Prepare the full bank either way, because panels increasingly mix both roles in one loop.
Do certifications help with big data interview questions?
They help most early: Databricks, GCP Professional Data Engineer, and AWS Data Engineer maps of concepts line up well with the beginner and intermediate tiers of big data interview questions here. Past a few years of experience, interviewers weight war stories over certificates, so shift that prep time to the scenario tier and the labs.
What should I read after this page?
Continue with the Kubernetes interview questions and Docker interview questions banks, since most modern big data platforms run on containers, then the Kafka interview questions bank for the streaming half of big data interview questions, and browse the DevOps Prep hub for the rest of the series as it ships.