Class PersistentMetadataCheckpointStorageLocation
- java.lang.Object
-
- org.apache.flink.runtime.state.memory.MemCheckpointStreamFactory
-
- org.apache.flink.runtime.state.memory.PersistentMetadataCheckpointStorageLocation
-
- All Implemented Interfaces:
CheckpointStorageLocation
,CheckpointStreamFactory
public class PersistentMetadataCheckpointStorageLocation extends MemCheckpointStreamFactory implements CheckpointStorageLocation
A checkpoint storage location for theMemCheckpointStreamFactory
when it durably persists the metadata in a file system.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.runtime.state.memory.MemCheckpointStreamFactory
MemCheckpointStreamFactory.MemoryCheckpointOutputStream
-
-
Constructor Summary
Constructors Constructor Description PersistentMetadataCheckpointStorageLocation(FileSystem fileSystem, Path checkpointDir, int maxStateSize)
Creates a checkpoint storage persists metadata to a file system and stores state in line in state handles with the metadata.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CheckpointMetadataOutputStream
createMetadataOutputStream()
Creates the output stream to persist the checkpoint metadata to.void
disposeOnFailure()
Disposes the checkpoint location in case the checkpoint has failed.CheckpointStorageLocationReference
getLocationReference()
Gets a reference to the storage location.-
Methods inherited from class org.apache.flink.runtime.state.memory.MemCheckpointStreamFactory
canFastDuplicate, createCheckpointStateOutputStream, duplicate, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.flink.runtime.state.CheckpointStreamFactory
canFastDuplicate, couldReuseStateHandle, createCheckpointStateOutputStream, duplicate, reusePreviousStateHandle
-
-
-
-
Constructor Detail
-
PersistentMetadataCheckpointStorageLocation
public PersistentMetadataCheckpointStorageLocation(FileSystem fileSystem, Path checkpointDir, int maxStateSize)
Creates a checkpoint storage persists metadata to a file system and stores state in line in state handles with the metadata.- Parameters:
fileSystem
- The file system to which the metadata will be written.checkpointDir
- The directory where the checkpoint metadata will be written.
-
-
Method Detail
-
createMetadataOutputStream
public CheckpointMetadataOutputStream createMetadataOutputStream() throws IOException
Description copied from interface:CheckpointStorageLocation
Creates the output stream to persist the checkpoint metadata to.- Specified by:
createMetadataOutputStream
in interfaceCheckpointStorageLocation
- Returns:
- The output stream to persist the checkpoint metadata to.
- Throws:
IOException
- Thrown, if the stream cannot be opened due to an I/O error.
-
disposeOnFailure
public void disposeOnFailure() throws IOException
Description copied from interface:CheckpointStorageLocation
Disposes the checkpoint location in case the checkpoint has failed. This method disposes all the data at that location, not just the data written by the particular node or process that calls this method.- Specified by:
disposeOnFailure
in interfaceCheckpointStorageLocation
- Throws:
IOException
-
getLocationReference
public CheckpointStorageLocationReference getLocationReference()
Description copied from interface:CheckpointStorageLocation
Gets a reference to the storage location. This reference is sent to the target storage location via checkpoint RPC messages and checkpoint barriers, in a format avoiding backend-specific classes.If there is no custom location information that needs to be communicated, this method can simply return
CheckpointStorageLocationReference.getDefault()
.- Specified by:
getLocationReference
in interfaceCheckpointStorageLocation
-
-