flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niels Basjes <Ni...@basjes.nl>
Subject Getting two types of events from a Window (Trigger)?
Date Thu, 10 Dec 2015 10:55:48 GMT

I'm working on something that uses the Flink Window feature.
I have written a custom Trigger to build the Window I need.

I am using the Window feature because I need state and I need to expire
(and clean) this state after a timeout (I use the onEventTime to do that).
Because I need the data streaming in real time (augmented with the
mentioned state) I 'FIRE' after every event. Just before I 'PURGE' the
window I need the fact of this purge (and some of the stats of this Window)
as a separate event in a separate 'DataStream'.

Now the interfaces of the various classes only support output as a single
java type (very sane choice).
So what I do right now is put my events on something 'external'
(HBase/Kafka) and read it in via a different Source implementation.

My question: Is there a better way to do this?
Can I (for example) create a special 'Source' that I can pass as a
parameter to my Trigger and then onEventTime just output a 'new event' ?

What do you recommend?

Best regards / Met vriendelijke groeten,

Niels Basjes

View raw message