Re: Events are assigned to wrong window

2017-01-27 Thread Aljoscha Krettek
Yes, that's true. On Fri, 27 Jan 2017 at 13:16 Nico wrote: > Hi Aljoscha, > > got it!!! :) Thank you. So, in order to retain the "original" timestamps, > it would be necessary to assign the timestemps after the MapFunction > instead of the kafka source? At lest, this

Re: Events are assigned to wrong window

2017-01-27 Thread Nico
Hi Aljoscha, got it!!! :) Thank you. So, in order to retain the "original" timestamps, it would be necessary to assign the timestemps after the MapFunction instead of the kafka source? At lest, this solves the issue in the example. Best, Nico 2017-01-27 11:49 GMT+01:00 Aljoscha Krettek

Re: Events are assigned to wrong window

2017-01-27 Thread Aljoscha Krettek
Now I see. What you're doing in this example is basically reassigning timestamps to other elements in your stateful MapFunction. Flink internally keeps track of the timestamp of an element. This can normally not be changed, except by using a TimestampAssigner, which you're doing. Now, the output

Re: Events are assigned to wrong window

2017-01-26 Thread Nico
Hi, can anyone help me with this problem? I don't get it. Forget the examples below, I've created a copy / paste example to reproduce the problem of incorrect results when using key-value state und windowOperator. public class StreamingJob { public static void main(String[] args) throws

Re: Events are assigned to wrong window

2017-01-16 Thread Nico
Hi Aljoscha, is was able to identify the root cause of the problem. It is my first map function using the ValueState. But first, the assignTimestampsAndWatermarks() is called after the connector to Kafka is generated: FlinkKafkaConsumer09 carFlinkKafkaConsumer09 = new

Re: Events are assigned to wrong window

2017-01-09 Thread Aljoscha Krettek
Hi, I'm assuming you also have the call to assignTimestampsAndWatermarks() somewhere in there as well, as in: stream .assignTimestampsAndWatermarks(new TimestampGenerator()) // or somewhere else in the pipeline .keyBy("id") .map(...) .filter(...) .map(...)

Re: Events are assigned to wrong window

2017-01-02 Thread Nico
Hi Aljoscha, thank you for having a look. Actually there is not too much code based on timestamps: stream .keyBy("id") .map(...) .filter(...) .map(...) .keyBy("areaID") .map(new KeyExtractor()) .keyBy("f1.areaID","f0.sinterval")

Events are assigned to wrong window

2016-12-21 Thread Nico
Hi @all, I am using a TumblingEventTimeWindows.of(Time.seconds(20)) for testing. During this I found a strange behavior (at least for me) in the assignment of events. The first element of a new window is actually always part of the old window. I thought the events are late, but then they they