flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niels Basjes <Ni...@basjes.nl>
Subject Triggering events
Date Mon, 30 Nov 2015 13:47:21 GMT

I'm experimenting with a custom Windowing setup over clickstream data.
I want the timestamps of this clickstream data to be the timestamps 'when
the event occurred' and in the Windows I need to trigger on these times.

For testing I created a source roughly like this:

    public class ManualTimeEventSource extends
RichEventTimeSourceFunction<Long> {

                    ctx.collectWithTimestamp(event, event.timestamp);

But none of the triggers were called so I started digging through the code.

Then I figured I apparently needed to add the watermarks myself, so I
added a line:

                    ctx.emitWatermark(new Watermark(event.timestamp));

But now I get:

*Caused by: java.lang.ClassCastException:
org.apache.flink.streaming.api.watermark.Watermark cannot be cast to
* at
* at
* at
* at
* at
* at
* ... 9 more*

This seems like a bug to me (StreamElement vs StreamRecord). Is it a bug in
Flink or in my code?

What is the right way to trigger the events in my Windowing setup?

P.S. I'm binding my Java application against Flink version 0.10.1

Best regards / Met vriendelijke groeten,

Niels Basjes

View raw message