Hi Zhuliang,

I would suggest u reading the comments from
'ExternallyInducedSource.java'[1].

"Sources that implement this interface do not trigger checkpoints when
receiving a
trigger message from the checkpoint coordinator, but 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 {@link WithMasterCheckpointHook 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."

[1]
https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/checkpoint/ExternallyInducedSource.java

Hope this helps u.

Thx,
Xiangyu

李柱良 <243816...@qq.com> 于2023年9月19日周二 11:03写道:

> Could any one tell me what the purpose and Philosophy of designing flink
> checkpoint master hook?
> Thanks.
>

Reply via email to