public class RestoreAndFailCommittableStateManager<GlobalCommitT> extends Object implements CommittableStateManager<GlobalCommitT>
CommittableStateManager which stores uncommitted ManifestCommittables in state.
When the job restarts, these ManifestCommittables will be restored and committed, then
an intended failure will occur, hoping that after the job restarts, all writers can start writing
based on the restored snapshot.
Useful for committing snapshots containing records. For example snapshots produced by table store writers.
| Constructor and Description |
|---|
RestoreAndFailCommittableStateManager(SerializableSupplier<VersionedSerializer<GlobalCommitT>> committableSerializer) |
RestoreAndFailCommittableStateManager(SerializableSupplier<VersionedSerializer<GlobalCommitT>> committableSerializer,
boolean partitionMarkDoneRecoverFromState) |
| Modifier and Type | Method and Description |
|---|---|
void |
initializeState(org.apache.flink.runtime.state.StateInitializationContext context,
Committer<?,GlobalCommitT> committer) |
void |
snapshotState(org.apache.flink.runtime.state.StateSnapshotContext context,
List<GlobalCommitT> committables) |
public RestoreAndFailCommittableStateManager(SerializableSupplier<VersionedSerializer<GlobalCommitT>> committableSerializer)
public RestoreAndFailCommittableStateManager(SerializableSupplier<VersionedSerializer<GlobalCommitT>> committableSerializer, boolean partitionMarkDoneRecoverFromState)
public void initializeState(org.apache.flink.runtime.state.StateInitializationContext context,
Committer<?,GlobalCommitT> committer)
throws Exception
initializeState in interface CommittableStateManager<GlobalCommitT>Exceptionpublic void snapshotState(org.apache.flink.runtime.state.StateSnapshotContext context,
List<GlobalCommitT> committables)
throws Exception
snapshotState in interface CommittableStateManager<GlobalCommitT>ExceptionCopyright © 2023–2025 The Apache Software Foundation. All rights reserved.