public class AcrossCheckpointFileMergingSnapshotManager extends FileMergingSnapshotManagerBase
FileMergingSnapshotManager that merging files across checkpoints.FileMergingSnapshotManagerBase.DirectoryHandleWithReferenceTrackFileMergingSnapshotManager.SpaceStat, FileMergingSnapshotManager.SubtaskKeycheckpointDir, filePoolType, fs, ioExecutor, lock, managedExclusiveStateDir, managedExclusiveStateDirHandle, maxPhysicalFileSize, maxSpaceAmplification, metricGroup, physicalFileDeleter, sharedStateDir, shouldSyncAfterClosingLogicalFile, spaceStat, taskOwnedStateDir, uploadedStates, writeBufferSize| Constructor and Description |
|---|
AcrossCheckpointFileMergingSnapshotManager(String id,
long maxFileSize,
PhysicalFilePool.Type filePoolType,
float maxSpaceAmplification,
Executor ioExecutor,
org.apache.flink.metrics.MetricGroup metricGroup) |
| Modifier and Type | Method and Description |
|---|---|
protected PhysicalFile |
getOrCreatePhysicalFileForCheckpoint(FileMergingSnapshotManager.SubtaskKey subtaskKey,
long checkpointID,
CheckpointedStateScope scope)
Get a reused physical file or create one.
|
protected void |
returnPhysicalFileForNextReuse(FileMergingSnapshotManager.SubtaskKey subtaskKey,
long checkpointId,
PhysicalFile physicalFile)
Try to return an existing physical file to the manager for next reuse.
|
close, couldReusePreviousStateHandle, createCheckpointStateOutputStream, createLogicalFile, createPhysicalFile, createPhysicalPool, deletePhysicalFile, discardCheckpoint, discardSingleLogicalFile, generatePhysicalFilePath, getId, getLogicalFile, getManagedDir, getManagedDirStateHandle, initFileSystem, notifyCheckpointAborted, notifyCheckpointComplete, notifyCheckpointStart, notifyCheckpointSubsumed, registerSubtaskForSharedStates, restoreStateHandles, reusePreviousStateHandle, unregisterSubtaskclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisFileMergingHandlepublic AcrossCheckpointFileMergingSnapshotManager(String id, long maxFileSize, PhysicalFilePool.Type filePoolType, float maxSpaceAmplification, Executor ioExecutor, org.apache.flink.metrics.MetricGroup metricGroup)
@Nonnull protected PhysicalFile getOrCreatePhysicalFileForCheckpoint(FileMergingSnapshotManager.SubtaskKey subtaskKey, long checkpointID, CheckpointedStateScope scope) throws IOException
FileMergingSnapshotManagerBaseBasic logic of file reusing: whenever a physical file is needed, this method is called
with necessary information provided for acquiring a file. The file will not be reused until
it is written and returned to the reused pool by calling FileMergingSnapshotManagerBase.returnPhysicalFileForNextReuse(org.apache.flink.runtime.checkpoint.filemerging.FileMergingSnapshotManager.SubtaskKey, long, org.apache.flink.runtime.checkpoint.filemerging.PhysicalFile).
getOrCreatePhysicalFileForCheckpoint in class FileMergingSnapshotManagerBasesubtaskKey - the subtask key for the callercheckpointID - the checkpoint idscope - checkpoint scopeIOException - thrown if anything goes wrong with file system.protected void returnPhysicalFileForNextReuse(FileMergingSnapshotManager.SubtaskKey subtaskKey, long checkpointId, PhysicalFile physicalFile) throws IOException
FileMergingSnapshotManagerBaseBasic logic of file reusing, see FileMergingSnapshotManagerBase.getOrCreatePhysicalFileForCheckpoint(org.apache.flink.runtime.checkpoint.filemerging.FileMergingSnapshotManager.SubtaskKey, long, org.apache.flink.runtime.state.CheckpointedStateScope).
returnPhysicalFileForNextReuse in class FileMergingSnapshotManagerBasesubtaskKey - the subtask key for the callercheckpointId - in which checkpoint this physical file is requested.physicalFile - the returning checkpointIOException - thrown if anything goes wrong with file system.#getOrCreatePhysicalFileForCheckpoint(SubtaskKey, long, CheckpointedStateScope)Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.