Search code examples
apache-flink

Specify TimeCharacteristic to be EventTime, but doens't specify the watermark strategy


I am using Flink 1.12, and I have specified the time characteristic to be event time, as follows:

env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime)

I have forgot to specify the water mark strategy, I would like to ask how flink will act if I only specify the TimeCharacteristic,but not specify the Watermark strategy.


Solution

  • It depends, if You won't to any time based operations like windowing or anything that accesses timestamp of the record then nothing will happen, it will work just as it should be working.

    If on the other hand You will use windowing with such situation, or any other operation that is time based it will throw the RuntimeException saying that the Record has timestamp equal to Long.MIN_VALUE and some suggestions.