public class RestoreAndFailCommittableStateManager<GlobalCommitT> extends Object implements CommittableStateManager<GlobalCommitT>
CommittableStateManager
which stores uncommitted ManifestCommittable
s in state.
When the job restarts, these ManifestCommittable
s 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) |
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 void initializeState(org.apache.flink.runtime.state.StateInitializationContext context, Committer<?,GlobalCommitT> committer) throws Exception
initializeState
in interface CommittableStateManager<GlobalCommitT>
Exception
public void snapshotState(org.apache.flink.runtime.state.StateSnapshotContext context, List<GlobalCommitT> committables) throws Exception
snapshotState
in interface CommittableStateManager<GlobalCommitT>
Exception
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.