CommT - type of committable@Internal public class CommittableCollector<CommT> extends Object
CommittableSummary.| 构造器和说明 |
|---|
CommittableCollector(int subtaskId,
int numberOfSubtasks) |
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
Collection<? extends CheckpointCommittableManager<CommT>> |
getCheckpointCommittablesUpTo(long checkpointId)
Returns all
CheckpointCommittableManager until the requested checkpoint id. |
CommittableManager<CommT> |
getEndOfInputCommittable()
Returns
CheckpointCommittableManager that is currently hold by the collector and
associated with the EOI checkpoint id. |
int |
getNumberOfSubtasks()
Returns number of subtasks.
|
int |
getSubtaskId()
Returns subtask id.
|
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.api.common.functions.RuntimeContext context)
Creates a
CommittableCollector based on the current runtime information. |
public static <CommT> CommittableCollector<CommT> of(org.apache.flink.api.common.functions.RuntimeContext context)
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 committablecontext - holding runtime of informationCommittableCollectorpublic 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 - counterCheckpointCommittableManager@Nullable public CommittableManager<CommT> getEndOfInputCommittable()
CheckpointCommittableManager that is currently hold by the collector and
associated with the EOI checkpoint id.public 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 int getNumberOfSubtasks()
public int getSubtaskId()
public CommittableCollector<CommT> copy()
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.