第三步
创建 WatermarkStrategy 对象后,接下来,通过 WatermarkStrategy 对象提取 数据中的 事件时间
有以下方法(在 WatermarkStrategy 接口中):
方法一
下面方法使用较多,需要实现 SerializableTimestampAssigner 接口
声明:
default WatermarkStrategy<T> withTimestampAssigner(SerializableTimestampAssigner<T> timestampAssigner)
方法二
声明:
default WatermarkStrategy<T> withTimestampAssigner(TimestampAssignerSupplier<T> timestampAssigner)