Hi Kristoff, The recommended alternative is to use SideOutputs as described in [1]. Could you elaborate why you think side outputs are not a good choice for your usecase?
Cheers, Kostas [1] https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/side_output.html On Thu, Dec 19, 2019 at 5:13 PM KristoffSC <krzysiek.chmielew...@gmail.com> wrote: > > Hi, > I've noticed that SplitStream class is marked as deprecated, although split > method of DataStream is not. > Also there is no alternative proposed in SplitStream doc for it. > > In my use case I will have a stream of events that I have to split into two > separate streams based on some function. Events with field that meets some > condition should go to the first stream, where all other should go to the > different stream. > > Later both streams should be processed in a different manner. > > I was planing to use approach presented here: > https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/operators/ > > SplitStream<Integer> split = someDataStream.split(new > OutputSelector<Integer>() { > @Override > public Iterable<String> select(Integer value) { > List<String> output = new ArrayList<String>(); > if (value % 2 == 0) { > output.add("even"); > } > else { > output.add("odd"); > } > return output; > } > }); > > But it turns out that SplitStream is deprecated. > Also I've found similar question on SO > https://stackoverflow.com/questions/53588554/apache-flink-using-filter-or-split-to-split-a-stream > > I don't fink filter and SideOutputs are good choice here. > > I will be thankful for an any suggestion. > > > > > -- > Sent from: > http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/