intermediatebig-data

Spark RDDs (Resilient Distributed Datasets)

The original, low-level building block Spark is built on — resilient, distributed, and immutable.

Key Points

What it is

An RDD (Resilient Distributed Dataset) is Spark's original core data structure: an immutable, distributed collection of objects spread across a cluster that can be processed in parallel and automatically recovers from node failures using its lineage of transformations.

Why it exists

Early distributed systems needed fault tolerance, which usually meant replicating data across machines — expensive in storage. RDDs exist to achieve fault tolerance differently: by remembering the sequence of operations (lineage) that built the data, so any lost piece can simply be recomputed rather than restored from a redundant copy.

Intuition

Instead of keeping three physical backup copies of a document (expensive), imagine keeping a detailed, precise recipe of every edit that was ever made to produce it. If the document is destroyed, you can perfectly reconstruct it just by replaying the recipe from the original source. That recipe is the RDD's 'lineage.'

When to use

When not to use

Common mistakes

In practice

Rarely used directly in modern data science pipelines, but understanding RDDs clarifies why Spark can recover gracefully from failures and why the DataFrame API — built on the same core idea — is both fault-tolerant and fast.

Was this concept helpful?

Spot an error or gap? Suggest an edit →

Related concepts

spark-dataframesspark-transformations-actionsapache-spark-intro
Chirp at me!