Apache Beam 使用早期触发器触发窗格的次数 [英] Apache Beam number of times a pane is fired with early triggers

查看:20
本文介绍了Apache Beam 使用早期触发器触发窗格的次数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在流束管道中,触发器设置为

In a streaming beam pipeline, a trigger is set to be

Window.into(FixedWindows.of(Duration.standardHours(1)))
              .triggering(AfterWatermark
                            .pastEndOfWindow()
                            .withEarlyFirings(AfterProcessingTime
                                    .pastFirstElementInPane()
                                    .plusDelayOf(Duration.standardMinutes(15))))
              .withAllowedLateness(Duration.standardHours(1))
              .accumulatingFiredPanes())

  1. 如果在早期触发(当前窗口的第一个元素之后 15 分钟)和水印之间没有新数据,在水印的末尾是否会再次触发?

  1. If there's no new data between the early firing (15 minutes after the first element of the current window) and the watermark, will there be another firing at the end of the watermark?

如果是,在同样的场景下,如果accumulatingFiredPanes改成discardingFiredPanes,会不会在水印的末尾再次触发?

If yes, under the same scenario, will there be another firing at the end of the watermark if accumulatingFiredPanes is changed to discardingFiredPanes?

推荐答案

  1. 是的.当水印通过窗口的末端时,应该总是触发.早期触发窗格将标记为早,水印窗格将标记为准时.

  1. Yes. There should always be a firing when the watermark passes the end of the window. The early firing panes will be marked as early, and the watermark pane will be marked as on time.

是的,目前我们始终保证有一个 on_time 窗格,这意味着会在水印的末尾触发.

Yes, currently we always guarantee an on_time pane, which means there will be a firing at the end of the watermark.

这篇关于Apache Beam 使用早期触发器触发窗格的次数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆