|
This post was updated on .
Hi Flink users,
Can I ask is my understanding of onEventTime() correct?
In my custom trigger, I have sth as follows:
onElement(JSONObject element, long timestamp, W window, TriggerContext ctx){
if(count == 3) {
ctx.registerEventTimeTimer(ctx.ctx.getCurrentWatermark()+100000);
return TriggerResult.Continue;
}
}
onEventTime(long time, W window, TriggerContext ctx){
return TriggerResult.FIRE_AND_PURGE;
}
and I expect onEventTime(long time, W window, TriggerContext ctx) will be called when watermark has passed 100000 millis.
but nothing happens,,,did I misunderstand sth?
Best,
Sendoh
|