flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aljoscha Krettek <aljos...@apache.org>
Subject Re: Window
Date Sat, 07 May 2016 07:50:53 GMT
you could do it with a combination of GlobalWindows and the

env.socketTextStream("", 9999)
  .map(new mapper())

  .apply(new MyRichWindowFunction())

This, however, will fire on 5 second intervals only for keys that have
already been seen once. So it might not be too useful. In general, it is
hard to do empty windows since windows are normally always tied to a key,
and if there is not element there is no key, and therefore normally no


On Thu, 5 May 2016 at 11:39 <toletum@toletum.org> wrote:

> Hi!
> I want a window which should be fired each 5 seconds, whether or not there
> events.
>         env.socketTextStream("", 9999)
>         .map(new mapper())
>         .keyBy(0)
>         .timeWindow(Time.seconds(5))
>         .apply(new MyRichWindowFunction())
> It works if the window has events, but, it doesn't if there aren't events.
> Somebody knows how I could force it. I tried with a trigger and
> ContinuousProcessingTimeTrigger, but, I don't know how use it.
> Regards,
> Toletum

View raw message