CommT - type of committable@Internal public class CommittableCollector<CommT> extends Object
Each checkpoint in turn is handled by a CheckpointCommittableManager.
| Constructor and Description |
|---|
CommittableCollector(org.apache.flink.metrics.groups.SinkCommitterMetricGroup metricGroup) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(CommittableMessage<CommT> message)
Adds a
CommittableMessage to the collector to hold it until emission. |
CommittableCollector<CommT> |
copy()
Returns a new committable collector that deep copies all internals.
|
boolean |
equals(Object o) |
Collection<? extends CheckpointCommittableManager<CommT>> |
getCheckpointCommittablesUpTo(long checkpointId)
Returns all
CheckpointCommittableManager until the requested checkpoint id. |
Optional<CheckpointCommittableManager<CommT>> |
getEndOfInputCommittable()
Returns
CheckpointCommittableManager belonging to the last input. |
int |
hashCode() |
boolean |
isFinished()
Returns whether all
CheckpointCommittableManager currently hold by the collector are
either committed or failed. |
void |
merge(CommittableCollector<CommT> cc)
Merges all information from an external collector into this collector.
|
static <CommT> CommittableCollector<CommT> |
of(org.apache.flink.metrics.groups.SinkCommitterMetricGroup metricGroup)
Creates a
CommittableCollector based on the current runtime information. |
void |
remove(CheckpointCommittableManager<CommT> manager)
Removes the manager for a specific checkpoint and all it's metadata.
|
String |
toString() |
public CommittableCollector(org.apache.flink.metrics.groups.SinkCommitterMetricGroup metricGroup)
public static <CommT> CommittableCollector<CommT> of(org.apache.flink.metrics.groups.SinkCommitterMetricGroup metricGroup)
CommittableCollector based on the current runtime information. This method
should be used for to instantiate a collector for all Sink V2.CommT - type of the committablemetricGroup - storing the committable metricsCommittableCollectorpublic void addMessage(CommittableMessage<CommT> message)
CommittableMessage to the collector to hold it until emission.message - either CommittableSummary or CommittableWithLineagepublic Collection<? extends CheckpointCommittableManager<CommT>> getCheckpointCommittablesUpTo(long checkpointId)
CheckpointCommittableManager until the requested checkpoint id.checkpointId - counterCheckpointCommittableManagerpublic Optional<CheckpointCommittableManager<CommT>> getEndOfInputCommittable()
CheckpointCommittableManager belonging to the last input.CheckpointCommittableManagerpublic boolean isFinished()
CheckpointCommittableManager currently hold by the collector are
either committed or failed.CheckpointCommittableManagerpublic void merge(CommittableCollector<CommT> cc)
This method is important during recovery from existing state.
cc - other CommittableCollectorpublic CommittableCollector<CommT> copy()
CommittableCollectorpublic void remove(CheckpointCommittableManager<CommT> manager)
Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.