Interface ExternallyInducedSource<T,CD>
-
- Type Parameters:
T
- Type of the elements produced by the source functionCD
- The type of the data stored in the checkpoint by the master that triggers
- All Superinterfaces:
Function
,Serializable
,SourceFunction<T>
,WithMasterCheckpointHook<CD>
@Internal public interface ExternallyInducedSource<T,CD> extends SourceFunction<T>, WithMasterCheckpointHook<CD>
Deprecated.This interface is based on theSourceFunction
API, which is due to be removed. Use the newSource
API instead.Sources that implement this interface delay checkpoints when receiving a trigger message from the checkpoint coordinator to the point when their input data/events indicate that a checkpoint should be triggered.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ExternallyInducedSource.CheckpointTrigger
Deprecated.Through theCheckpointTrigger
, the source function notifies the Flink source operator when to trigger the checkpoint.-
Nested classes/interfaces inherited from interface org.apache.flink.streaming.api.functions.source.legacy.SourceFunction
SourceFunction.SourceContext<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
setCheckpointTrigger(ExternallyInducedSource.CheckpointTrigger checkpointTrigger)
Deprecated.Sets the checkpoint trigger through which the source can trigger the checkpoint.-
Methods inherited from interface org.apache.flink.streaming.api.functions.source.legacy.SourceFunction
cancel, run
-
Methods inherited from interface org.apache.flink.streaming.api.checkpoint.WithMasterCheckpointHook
createMasterTriggerRestoreHook
-
-
-
-
Method Detail
-
setCheckpointTrigger
void setCheckpointTrigger(ExternallyInducedSource.CheckpointTrigger checkpointTrigger)
Deprecated.Sets the checkpoint trigger through which the source can trigger the checkpoint.- Parameters:
checkpointTrigger
- The checkpoint trigger to set
-
-