public interface Committer<CommitT,GlobalCommitT> extends AutoCloseable
Committer is responsible for creating and committing an aggregated committable, which
we call committable (see combine(long, long, java.util.List<CommitT>)).
The Committer runs with parallelism equal to 1.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Committer.Context
Context to create
Committer. |
static interface |
Committer.Factory<CommitT,GlobalCommitT>
Factory to create
Committer. |
| Modifier and Type | Method and Description |
|---|---|
GlobalCommitT |
combine(long checkpointId,
long watermark,
GlobalCommitT t,
List<CommitT> committables) |
GlobalCommitT |
combine(long checkpointId,
long watermark,
List<CommitT> committables)
Compute an aggregated committable from a list of committables.
|
void |
commit(List<GlobalCommitT> globalCommittables)
Commits the given
GlobalCommitT. |
static Committer.Context |
createContext(String commitUser,
org.apache.flink.metrics.groups.OperatorMetricGroup metricGroup,
boolean streamingCheckpointEnabled,
boolean isRestored,
org.apache.flink.api.common.state.OperatorStateStore stateStore) |
default int |
filterAndCommit(List<GlobalCommitT> globalCommittables) |
int |
filterAndCommit(List<GlobalCommitT> globalCommittables,
boolean checkAppendFiles)
Filter out all
GlobalCommitT which have committed, and commit the remaining GlobalCommitT. |
boolean |
forceCreatingSnapshot() |
Map<Long,List<CommitT>> |
groupByCheckpoint(Collection<CommitT> committables) |
closeboolean forceCreatingSnapshot()
GlobalCommitT combine(long checkpointId, long watermark, List<CommitT> committables) throws IOException
IOExceptionGlobalCommitT combine(long checkpointId, long watermark, GlobalCommitT t, List<CommitT> committables)
void commit(List<GlobalCommitT> globalCommittables) throws IOException, InterruptedException
GlobalCommitT.IOExceptionInterruptedExceptionint filterAndCommit(List<GlobalCommitT> globalCommittables, boolean checkAppendFiles) throws IOException
GlobalCommitT which have committed, and commit the remaining GlobalCommitT.IOExceptiondefault int filterAndCommit(List<GlobalCommitT> globalCommittables) throws IOException
IOExceptionstatic Committer.Context createContext(String commitUser, @Nullable org.apache.flink.metrics.groups.OperatorMetricGroup metricGroup, boolean streamingCheckpointEnabled, boolean isRestored, org.apache.flink.api.common.state.OperatorStateStore stateStore)
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.