public class DuplicatingStateChangeFsUploader extends AbstractStateChangeFsUploader
LocalChangelogRegistry, TaskChangelogRegistry and ChangelogTaskLocalStateStore are responsible for managing
them.
TaskChangelogRegistry is
responsible for TM side, and SharedStateRegistry is responsible for JM side.
The total discard logic of local dstl files is:
TaskChangelogRegistry.startTracking(org.apache.flink.runtime.state.StreamStateHandle, java.util.Set<java.util.UUID>) on AbstractStateChangeFsUploader.upload(java.util.Collection<org.apache.flink.changelog.fs.StateChangeUploadScheduler.UploadTask>).
ChangelogTaskLocalStateStore by
AsyncCheckpointRunnable#reportCompletedSnapshotStates().
LocalChangelogRegistry#register when
ChangelogKeyedStateBackend#notifyCheckpointComplete() , files of the previous
checkpoint will be deleted by LocalChangelogRegistry#discardUpToCheckpoint at
the same time.
TaskChangelogRegistry.notUsed(org.apache.flink.runtime.state.StreamStateHandle, java.util.UUID) is responsible for deleting local files.
LocalChangelogRegistry#prune in FsStateChangelogWriter.reset(org.apache.flink.runtime.state.changelog.SequenceNumber, org.apache.flink.runtime.state.changelog.SequenceNumber, long).
StateChangeUploader.UploadTasksResultbufferSize, compression, metrics| Constructor and Description |
|---|
DuplicatingStateChangeFsUploader(org.apache.flink.api.common.JobID jobID,
org.apache.flink.core.fs.Path basePath,
org.apache.flink.core.fs.FileSystem fileSystem,
boolean compression,
int bufferSize,
ChangelogStorageMetricGroup metrics,
TaskChangelogRegistry changelogRegistry,
org.apache.flink.runtime.state.LocalRecoveryDirectoryProvider localRecoveryDirectoryProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.apache.flink.changelog.fs.OutputStreamWithPos |
prepareStream() |
generateFileName, uploadpublic DuplicatingStateChangeFsUploader(org.apache.flink.api.common.JobID jobID,
org.apache.flink.core.fs.Path basePath,
org.apache.flink.core.fs.FileSystem fileSystem,
boolean compression,
int bufferSize,
ChangelogStorageMetricGroup metrics,
TaskChangelogRegistry changelogRegistry,
org.apache.flink.runtime.state.LocalRecoveryDirectoryProvider localRecoveryDirectoryProvider)
public org.apache.flink.changelog.fs.OutputStreamWithPos prepareStream()
throws IOException
IOExceptionCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.