I am having a use case: stepA -> stepB -> stepC ... Now I need to use Flink processfunction to monitor the track. for example, once stepA comes in, I set up a timer 10s after A, and when 10s has passed, that timer is triggered, and we check our state to see if stepB has showed up. But here is the problem I have: I am using event-time with AssignerWithPunctuatedWatermarks. But when I print the context.timeservice().currentwatermark() in stepA, it shows LONG.MIN_VALUE. And the watermark of stepB is A's timestamp. I know this is due to
public long extractTimestamp(
MyEvent event, long previousElementTimestamp) {
return event.getTimeStamp();
}
public Watermark checkAndGetNextWatermark(
MyEvent event, long extractedTimestamp) {
return new Watermark(extractedTimestamp);
}
But what else can I do? Thanks