固定窗口中的默认水印是什么?

What is the default watermark in fixed windowing?

我正在阅读 Tyler Akidau 的文章 the-world-beyond-batch-streaming-102。对于水印我还是有点疑惑,即关于文章中的代码:

PCollection<KV<String, Integer>> scores = input
  .apply(Window.into(FixedWindows.of(Duration.standardMinutes(2)))
               .triggering(AtWatermark()))

  .apply(Sum.integersPerKey());

它只是告诉引擎在水印处触发,但引擎如何知道水印?据我了解,这应该是用户需要说的某种时间延迟。或者引擎构建得如此智能以至于它试图为用户制作一个(根据一些默认策略或配置)?

非常感谢。

Google Dataflow(这是 Tyler Akidau 在您引用的文章中描述的内容)可以使用启发式方法来估计水印——有关详细信息,请参阅 this answer

另一方面,Flink 依赖于 emitted by the data source or by a watermark generator 的显式水印。最常见的方法是假设有界延迟。