T
- Type of the elements produced by the source functionCD
- The type of the data stored in the checkpoint by the master that triggers@PublicEvolving public interface ExternallyInducedSource<T,CD> extends SourceFunction<T>, WithMasterCheckpointHook<CD>
Since sources cannot simply create a new checkpoint on their own, this mechanism
always goes together with a hook on the master side
.
In a typical setup, the hook on the master tells the source system (for example
the message queue) to prepare a checkpoint. The exact point when the checkpoint is
taken is then controlled by the event stream received from the source, and triggered
by the source function (implementing this interface) in Flink when seeing the relevant
events.
Modifier and Type | Interface and Description |
---|---|
static interface |
ExternallyInducedSource.CheckpointTrigger
Through the
CheckpointTrigger , the source function notifies the Flink
source operator when to trigger the checkpoint. |
SourceFunction.SourceContext<T>
Modifier and Type | Method and Description |
---|---|
void |
setCheckpointTrigger(ExternallyInducedSource.CheckpointTrigger checkpointTrigger)
Sets the checkpoint trigger through which the source can trigger the checkpoint.
|
cancel, run
createMasterTriggerRestoreHook
void setCheckpointTrigger(ExternallyInducedSource.CheckpointTrigger checkpointTrigger)
checkpointTrigger
- The checkpoint trigger to setCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.