flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KristoffSC <krzysiek.chmielew...@gmail.com>
Subject Deprecated SplitStream class - what should be use instead.
Date Thu, 19 Dec 2019 16:21:25 GMT
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:

SplitStream<Integer> split = someDataStream.split(new
OutputSelector<Integer>() {
    public Iterable<String> select(Integer value) {
        List<String> output = new ArrayList<String>();
        if (value % 2 == 0) {
        else {
        return output;

But it turns out that SplitStream is deprecated. 
Also I've found similar question on SO

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/

View raw message