flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xiang Zhang <xzhan...@ncsu.edu>
Subject Create window before the first event
Date Tue, 12 Jul 2016 02:21:05 GMT
Hi,

I am trying to have a trigger fires every 5 mins, even when sometimes no
event comes (just output default for empty window). The closest solution I
got to work is this:

  datastream.windowAll(GlobalWindows.create())
               
.trigger(ContinuousProcessingTimeTrigger.of(Time.minutes(5)))
                .apply { MY_APPLY_FUNCTION}

For master branch, this works after the first event appears, then it
continuously fires every 5 mins even when there is no events (not work for
release 1.0.3 though due to the change in ContinuousProcessingTimeTrigger).

However, sometimes my first event may not appear in the first 5 mins. I
still need to fire a default value first, but it seems the GlobalWindow is
only created after seen an event, so it only works after the first event. Is
there any way I can create the window before the first event comes in
windowAssigner?

Thanks,
Xiang



--
View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Create-window-before-the-first-event-tp7920.html
Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.

Mime
View raw message