Re: assignTimestamp after keyBy
Posted by
pushpendra.jaiswal on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/assignTimestamp-after-keyBy-tp8962p8964.html
Please refer
https://ci.apache.org/projects/flink/flink-docs-master/dev/event_timestamps_watermarks.htmlfor assigning timestamps.
You can do map after keyby to assign timestamps
e.g:
val withTimestampsAndWatermarks: DataStream[MyEvent] = stream
.filter( _.severity == WARNING )
.assignTimestampsAndWatermarks(new MyTimestampsAndWatermarks())
withTimestampsAndWatermarks
.keyBy( _.getGroup )
.timeWindow(Time.seconds(10))
.reduce( (a, b) => a.add(b) )
.addSink(...
~Pushpendra