Dawid Wysakowicz created FLINK-18873:
----------------------------------------
Summary: Make the WatermarkStrategy API more scala friendly
Key: FLINK-18873
URL:
https://issues.apache.org/jira/browse/FLINK-18873 Project: Flink
Issue Type: Improvement
Components: API / Core, API / DataStream
Affects Versions: 1.11.0
Reporter: Dawid Wysakowicz
Fix For: 1.12.0
Right now there is no reliable way of passing WatermarkGeneratorSupplier and/or TimestampAssigner as lambdas in scala.
The only way to use this API is:
{code}
.assignTimestampsAndWatermarks(
WatermarkStrategy.forGenerator[(String, Long)](
new WatermarkGeneratorSupplier[(String, Long)] {
override def createWatermarkGenerator(context: WatermarkGeneratorSupplier.Context): WatermarkGenerator[(String, Long)] =
new MyPeriodicGenerator
}
)
.withTimestampAssigner(new SerializableTimestampAssigner[(String, Long)] {
override def extractTimestamp(t: (String, Long), l: Long): Long = t._2
})
)
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)