flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nico Kruber <n...@data-artisans.com>
Subject Re: replacement for KeyedStream.fold(..) ?
Date Thu, 03 Aug 2017 13:15:58 GMT
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?


[1] https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/windows.html

On 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

View raw message