CheckpointStorage functionality.
Please inherit AbstractStateBackend instead. Custom checkpoint storage can be
additionally implemented as a separate class.@Deprecated @PublicEvolving public abstract class AbstractFileStateBackend extends AbstractStateBackend implements CheckpointStorage
FsStateBackend, the MemoryStateBackend, or the RocksDBStateBackend.
This class takes the base checkpoint- and savepoint directory paths, but also accepts null for both of then, in which case creating externalized checkpoint is not possible, and it is not possible to create a savepoint with a default path. Null is accepted to enable implementations that only optionally support default savepoints and externalized checkpoints.
The state backend is configured with a base directory and persists the checkpoint data of
specific checkpoints in specific subdirectories. For example, if the base directory was set to
hdfs://namenode:port/flink-checkpoints/, the state backend will create a subdirectory
with the job's ID that will contain the actual checkpoints: (hdfs://namenode:port/flink-checkpoints/1b080b6e710aabbef8993ab18c6de98b)
Each checkpoint individually will store all its files in a subdirectory that includes the
checkpoint number, such as hdfs://namenode:port/flink-checkpoints/1b080b6e710aabbef8993ab18c6de98b/chk-17/.
A savepoint that is set to be stored in path hdfs://namenode:port/flink-savepoints/,
will create a subdirectory savepoint-jobId(0, 6)-randomDigits in which it stores all
savepoint data. The random digits are added as "entropy" to avoid directory collisions.
A completed checkpoint writes its metadata into a file ''.
StateBackend.CustomInitializationMetrics, StateBackend.KeyedStateBackendParameters<K>, StateBackend.OperatorStateBackendParameterslatencyTrackingConfigBuilder| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFileStateBackend(org.apache.flink.core.fs.Path baseCheckpointPath,
org.apache.flink.core.fs.Path baseSavepointPath)
Deprecated.
Creates a backend with the given optional checkpoint- and savepoint base directories.
|
protected |
AbstractFileStateBackend(org.apache.flink.core.fs.Path baseCheckpointPath,
org.apache.flink.core.fs.Path baseSavepointPath,
org.apache.flink.configuration.ReadableConfig configuration)
Deprecated.
Creates a new backend using the given checkpoint-/savepoint directories, or the values
defined in the given configuration.
|
protected |
AbstractFileStateBackend(URI baseCheckpointPath,
URI baseSavepointPath)
Deprecated.
Creates a backend with the given optional checkpoint- and savepoint base directories.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.flink.core.fs.Path |
getCheckpointPath()
Deprecated.
Gets the checkpoint base directory.
|
org.apache.flink.core.fs.Path |
getSavepointPath()
Deprecated.
Gets the directory where savepoints are stored by default (when no custom path is given to
the savepoint trigger command).
|
CompletedCheckpointStorageLocation |
resolveCheckpoint(String pointer)
Deprecated.
Resolves the given pointer to a checkpoint/savepoint into a checkpoint location.
|
createKeyedStateBackend, createOperatorStateBackend, getCompressionDecoratorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateCheckpointStoragecreateAsyncKeyedStateBackend, getName, supportsAsyncKeyedStateBackend, supportsNoClaimRestoreMode, supportsSavepointFormat, useManagedMemoryprotected AbstractFileStateBackend(@Nullable URI baseCheckpointPath, @Nullable URI baseSavepointPath)
baseCheckpointPath - The base directory for checkpoints, or null, if none is configured.baseSavepointPath - The default directory for savepoints, or null, if none is set.protected AbstractFileStateBackend(@Nullable org.apache.flink.core.fs.Path baseCheckpointPath, @Nullable org.apache.flink.core.fs.Path baseSavepointPath)
baseCheckpointPath - The base directory for checkpoints, or null, if none is configured.baseSavepointPath - The default directory for savepoints, or null, if none is set.protected AbstractFileStateBackend(@Nullable org.apache.flink.core.fs.Path baseCheckpointPath, @Nullable org.apache.flink.core.fs.Path baseSavepointPath, org.apache.flink.configuration.ReadableConfig configuration)
This constructor can be used to create a backend that is based partially on a given backend and partially on a configuration.
baseCheckpointPath - The checkpoint base directory to use (or null).baseSavepointPath - The default savepoint directory to use (or null).configuration - The configuration to read values from.@Nullable public org.apache.flink.core.fs.Path getCheckpointPath()
@Nullable public org.apache.flink.core.fs.Path getSavepointPath()
public CompletedCheckpointStorageLocation resolveCheckpoint(String pointer) throws IOException
CheckpointStorageresolveCheckpoint in interface CheckpointStoragepointer - The external checkpoint pointer to resolve.IOException - Thrown, if the state backend does not understand the pointer, or if the
pointer could not be resolved due to an I/O error.Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.