liveBook · Manning

Checkpointing

As explained in Architecting an Apache Iceberg Lakehouse

A checkpoint is persisted progress information from which an incremental data-processing workflow can resume after interruption.

Checkpointing persists processing state so an incremental ingestion workflow can resume from its last known good position after interruption. The state may include offsets, timestamps, change identifiers, and coordinated commit status. Reliable recovery depends on replayable sources, because non-replayable sources limit downstream delivery guarantees. section 6.1.2 section 6.2.3

A checkpoint supports ingestion reliability by:

  • Recording which input records or offsets have been successfully committed, so failures retry only unfinished work. section 6.1.2
  • Coordinating processing state, offsets, and transactional commits so a checkpoint is committed completely or not at all. section 6.1.2
  • Giving micro-batch jobs explicit progress boundaries instead of ambiguous time ranges such as “yesterday.” section 6.2.2
  • Supporting stateful operations such as deduplication, sessionization, and change data capture across continuously arriving events. section 6.2.3
  • Requiring operational controls around commit frequency, state recovery, file generation, metadata growth, and compaction at high throughput. section 6.5.2 section 6.5.3

Spark Structured Streaming checkpoint

A Kafka-to-Iceberg Spark stream writes its recovery state to a durable checkpoint location: parsed.writeStream.format("iceberg").outputMode("append").option("checkpointLocation", "s3a://checkpoints/my-table/").start("my_catalog.db.my_table"). With an appropriate replayable source and processing configuration, the stream can resume while supporting exactly-once semantics. section 6.4.1

Figure 6.3 By using checkpointing to track which incoming records have been committed successfully, the system knows which records to retry when a failure occurs.

The figure traces how checkpointed commit state identifies successfully committed records and determines which records to retry after failure. section 6.1.2

How Architecting an Apache Iceberg Lakehouse covers it

How deep it goes
Explains offsets, state, retries, and transactional coordination, while deferring implementation-specific configuration and recovery tuning.
Examples
Uses Spark Kafka-to-Iceberg streaming, Flink checkpointed Kafka ingestion, and five-minute micro-batch progress boundaries.
What it assumes
Assumes familiarity with ingestion pipelines and offsets, while establishing replayability, resumability, and checkpoint-based recovery.
What you can do after
Operate and recover incremental ingestion pipelines from persisted progress while limiting duplicates, skipped records, and partial commits.
How it connects
Connects exactly-once processing, micro-batch ingestion, streaming ingestion, replayable sources, and atomic snapshot commits.

Also explained in

Compare how 6 books explain checkpointing →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Architecting an Apache Iceberg Lakehouse. The section links point to the parts of the book it draws on.