Hi Peter,
although unfortunately not documented yet in [1] (rumor has it that that is
going to change soon) and without a proper replacement note in the deprecation
javadoc, two things come to mind for replacing fold():
* AggregateFunction and
[All]WindowedStream#aggregate(AggregateFunction<T,ACC,R>) to create aggregates
of all events in a window
* a stateful [flat]map (as you mentioned)
These two should cover all cases.
Or did you have any use case in mind that doesn't fit in there?
Nico
[1]
https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/windows.htmlOn Wednesday, 2 August 2017 23:56:16 CEST Peter Ertl wrote:
> Hi folks,
>
> since KeyedStream.fold(..) is marked as @deprecated what is the proper
> replacement for that kind of functionality?
>
> Is mapWithState() and flatMapWithState() a *full* replacement?
>
> Cheers
> Peter