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

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

问题描述

在流束流水线中,触发器被设置为

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




  1. 如果在早期触发(当前窗口的第一个元素后15分钟)和水印之间没有新数据,那么会在如果是的话,在同样的情况下,如果 accumulatingFiredPanes c $ c>更改为 discardingFiredPanes code>?



解决方案

    是。当水印通过窗口的末端时,应始终有一个射击。早期的发射窗格将被标记为提前,并且水印窗格将被标记为准时。 是的,目前我们总是保证on_time窗格,其中意味着将在水印的结尾处发射。


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. 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?

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

解决方案

  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.

  2. 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天全站免登陆