如何一起使用GlobalWindow和Repeated.forever(...)触发器?
我的理解是,它应该写成:
PCollection<BeamRecord> record100 = record3.apply(Window.<BeamRecord>into(
FixedWindows.of(org.joda.time.Duration.standardMinutes(1)))
.triggering(Repeatedly.forever(AfterWatermark.pastEndOfWindow()))
.withAllowedLateness(org.joda.time.Duration.standardMinutes(1))
.discardingFiredPanes());
但我不知道如何使用此触发器实现GlobalWindow。
注意:在记录3中已应用组操作。
答案 0 :(得分:0)
这就是我为有限数据源实现触发并完美运行的方式。
PCollection<BeamRecord> record30_trig = record30.apply(Window.<BeamRecord>into(
new GlobalWindows())
.triggering(Repeatedly.forever(AfterWatermark.pastEndOfWindow()))
.withAllowedLateness(org.joda.time.Duration.standardMinutes(1))
.discardingFiredPanes());