I assume that along with DataStream#fold you would also remove WindowedStream#fold.
I'm in favor of going ahead with all of these. David On Mon, Aug 17, 2020 at 10:53 AM Dawid Wysakowicz <dwysakow...@apache.org> wrote: > Hi devs and users, > > I wanted to ask you what do you think about removing some of the > deprecated APIs around the DataStream API. > > The APIs I have in mind are: > > - RuntimeContext#getAllAccumulators (deprecated in 0.10) > - DataStream#fold and all related classes and methods such as > FoldFunction, FoldingState, FoldingStateDescriptor ... (deprecated in > 1.3/1.4) > - StreamExecutionEnvironment#setStateBackend(AbstractStateBackend) > (deprecated in 1.5) > - DataStream#split (deprecated in 1.8) > - Methods in (Connected)DataStream that specify keys as either indices > or field names such as DataStream#keyBy, DataStream#partitionCustom, > ConnectedStream#keyBy, .... (deprecated in 1.11) > > I think the first three should be straightforward. They are long > deprecated. The getAccumulators method is not used very often in my > opinion. The same applies to the DataStream#fold which additionally is not > very performant. Lastly the setStateBackend has an alternative with a class > from the AbstractStateBackend hierarchy, therefore it will be still code > compatible. Moreover if we remove the > #setStateBackend(AbstractStateBackend) we will get rid off warnings users > have right now when setting a statebackend as the correct method cannot be > used without an explicit casting. > > As for the DataStream#split I know there were some objections against > removing the #split method in the past. I still believe the output tags can > replace the split method already. > > The only problem in the last set of methods I propose to remove is that > they were deprecated only in the last release and those method were only > partially deprecated. Moreover some of the methods were not deprecated in > ConnectedStreams. Nevertheless I'd still be inclined to remove the methods > in this release. > > Let me know what do you think about it. > > Best, > > Dawid >