Class FsMergingCheckpointStorageAccess
- java.lang.Object
-
- org.apache.flink.runtime.state.filesystem.AbstractFsCheckpointStorageAccess
-
- org.apache.flink.runtime.state.filesystem.FsCheckpointStorageAccess
-
- org.apache.flink.runtime.state.filesystem.FsMergingCheckpointStorageAccess
-
- All Implemented Interfaces:
Closeable,AutoCloseable,CheckpointStorageAccess,CheckpointStorageCoordinatorView,CheckpointStorageWorkerView
public class FsMergingCheckpointStorageAccess extends FsCheckpointStorageAccess implements Closeable
An implementation of file merging checkpoint storage to file systems.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.runtime.state.filesystem.FsCheckpointStorageAccess
checkpointsDirectory, fileSizeThreshold, fileSystem, sharedStateDirectory, taskOwnedStateDirectory, writeBufferSize
-
Fields inherited from class org.apache.flink.runtime.state.filesystem.AbstractFsCheckpointStorageAccess
CHECKPOINT_DIR_PREFIX, CHECKPOINT_SHARED_STATE_DIR, CHECKPOINT_TASK_OWNED_STATE_DIR, METADATA_FILE_NAME
-
-
Constructor Summary
Constructors Constructor Description FsMergingCheckpointStorageAccess(org.apache.flink.core.fs.Path checkpointBaseDirectory, org.apache.flink.core.fs.Path defaultSavepointDirectory, org.apache.flink.api.common.JobID jobId, int fileSizeThreshold, int writeBufferSize, FileMergingSnapshotManager fileMergingSnapshotManager, Environment environment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()This will be registered to resource closer ofStreamTask.voidinitializeBaseLocationsForCheckpoint()Initializes the necessary prerequisites for storage locations of checkpoints.CheckpointStreamFactoryresolveCheckpointStorageLocation(long checkpointId, CheckpointStorageLocationReference reference)Resolves a storage location reference into a CheckpointStreamFactory.-
Methods inherited from class org.apache.flink.runtime.state.filesystem.FsCheckpointStorageAccess
createSavepointLocation, createTaskOwnedCheckpointStateToolset, createTaskOwnedStateStream, initializeLocationForCheckpoint, supportsHighlyAvailableStorage, toFileMergingStorage
-
Methods inherited from class org.apache.flink.runtime.state.filesystem.AbstractFsCheckpointStorageAccess
createCheckpointDirectory, decodePathFromReference, encodePathAsReference, getCheckpointDirectoryForJob, getDefaultSavepointDirectory, hasDefaultSavepointLocation, initializeLocationForSavepoint, resolveCheckpoint, resolveCheckpointPointer
-
-
-
-
Constructor Detail
-
FsMergingCheckpointStorageAccess
public FsMergingCheckpointStorageAccess(org.apache.flink.core.fs.Path checkpointBaseDirectory, @Nullable org.apache.flink.core.fs.Path defaultSavepointDirectory, org.apache.flink.api.common.JobID jobId, int fileSizeThreshold, int writeBufferSize, FileMergingSnapshotManager fileMergingSnapshotManager, Environment environment) throws IOException- Throws:
IOException
-
-
Method Detail
-
initializeBaseLocationsForCheckpoint
public void initializeBaseLocationsForCheckpoint() throws IOExceptionDescription copied from interface:CheckpointStorageCoordinatorViewInitializes the necessary prerequisites for storage locations of checkpoints.For file-based checkpoint storage, this method would initialize essential base checkpoint directories on checkpoint coordinator side and should be executed before calling
CheckpointStorageCoordinatorView.initializeLocationForCheckpoint(long).- Specified by:
initializeBaseLocationsForCheckpointin interfaceCheckpointStorageCoordinatorView- Overrides:
initializeBaseLocationsForCheckpointin classFsCheckpointStorageAccess- Throws:
IOException- Thrown, if these base storage locations cannot be initialized due to an I/O exception.
-
resolveCheckpointStorageLocation
public CheckpointStreamFactory resolveCheckpointStorageLocation(long checkpointId, CheckpointStorageLocationReference reference) throws IOException
Description copied from interface:CheckpointStorageWorkerViewResolves a storage location reference into a CheckpointStreamFactory.The reference may be the
default reference, in which case the method should return the default location, taking existing configuration and checkpoint ID into account.- Specified by:
resolveCheckpointStorageLocationin interfaceCheckpointStorageWorkerView- Overrides:
resolveCheckpointStorageLocationin classFsCheckpointStorageAccess- Parameters:
checkpointId- The ID of the checkpoint that the location is initialized for.reference- The checkpoint location reference.- Returns:
- A checkpoint storage location reflecting the reference and checkpoint ID.
- Throws:
IOException- Thrown, if the storage location cannot be initialized from the reference.
-
close
public void close()
This will be registered to resource closer ofStreamTask.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-