What does checkpointing do on Apache Spark?
Asked Answered
G

1

2

What does checkpointing do for Apache Spark, and does it take any hits on RAM or CPU?

Gourmand answered 14/4, 2016 at 19:34 Comment(2)
What do you not understand from reading the documentation? spark.apache.org/docs/latest/…Ocular
Possible duplicate of What is the difference between spark checkpoint and persist to a diskDrusie
S
1

From Apache Streaming Documentation - Hope it helps:

A streaming application must operate 24/7 and hence must be resilient to failures unrelated to the application logic (e.g., system failures, JVM crashes, etc.). For this to be possible, Spark Streaming needs to checkpoint enough information to a fault- tolerant storage system such that it can recover from failures. There are two types of data that are checkpointed.

  • Metadata checkpointing - Saving of the information defining the streaming computation to fault-tolerant storage like HDFS. This is used to recover from failure of the node running the driver of the streaming application (discussed in detail later). Metadata includes:
    • Configuration - The configuration that was used to create the streaming application.
    • DStream operations - The set of DStream operations that define the streaming application.
    • Incomplete batches
    • Batches whose jobs are queued but have not completed yet.
  • Data checkpointing - Saving of the generated RDDs to reliable storage. This is necessary in some stateful transformations that combine data across multiple batches. In such transformations, the generated RDDs depend on RDDs of previous batches, which causes the length of the dependency chain to keep increasing with time. To avoid such unbounded increases in recovery time (proportional to dependency chain), intermediate RDDs of stateful transformations are periodically checkpointed to reliable storage (e.g. HDFS) to cut off the dependency chains.

To summarize, metadata checkpointing is primarily needed for recovery from driver failures, whereas data or RDD checkpointing is necessary even for basic functioning if stateful transformations are used.

Sheng answered 14/4, 2016 at 19:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.