public class RestoreAndFailCommittableStateManager extends Object implements CommittableStateManager
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(org.apache.flink.util.function.SerializableSupplier<org.apache.flink.core.io.SimpleVersionedSerializer<ManifestCommittable>> committableSerializer) |
Modifier and Type | Method and Description |
---|---|
void |
initializeState(org.apache.flink.runtime.state.StateInitializationContext context,
Committer committer) |
void |
snapshotState(org.apache.flink.runtime.state.StateSnapshotContext context,
List<ManifestCommittable> committables) |
public RestoreAndFailCommittableStateManager(org.apache.flink.util.function.SerializableSupplier<org.apache.flink.core.io.SimpleVersionedSerializer<ManifestCommittable>> committableSerializer)
public void initializeState(org.apache.flink.runtime.state.StateInitializationContext context, Committer committer) throws Exception
initializeState
in interface CommittableStateManager
Exception
public void snapshotState(org.apache.flink.runtime.state.StateSnapshotContext context, List<ManifestCommittable> committables) throws Exception
snapshotState
in interface CommittableStateManager
Exception
Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.