...
The advantage of this is that configurations can be made more conveniently by continuously using `withXXX` . For example:
Code Block | ||||
---|---|---|---|---|
| ||||
inputStream .process(func1) // do process 1 .withConfigFoo(foo) // configure Foo for process 1 .withConfigBar(bar) // configure Bar for process 1 .process(func2) // do further process 2 |
...
Regarding the second point,process/ connectAndProcessand other operations performed on DataStreams will return an instance of corresponding interfaces. We will change the return type of one-input/two-output/two-input process and toSink methods as shown in the table below.
stream type | function | old return type | new return type |
NonKeyedPartitionStream | process(OneInputStreamProcessFunction) | NonKeyedPartitionStream | ProcessConfigurableAndNonKeyedPartitionStream |
process(TwoOutputStreamProcessFunction) | TwoNonKeyedPartitionStreams | ProcessConfigurableAndTwoNonKeyedPartitionStreams | |
connectAndProcess(NonKeyedPartitionStream, TwoInputStreamProcessFunction) | NonKeyedPartitionStream | ProcessConfigurableAndNonKeyedPartitionStream | |
connectAndProcess(BroadcastStream, TwoInputStreamProcessFunction | NonKeyedPartitionStream | ProcessConfigurableAndNonKeyedPartitionStream | |
toSink(Sink) | void | ProcessConfigurable | |
KeyedPartitionStream | process(OneInputStreamProcessFunction, KeySelector) | KeyedPartitionStream | ProcessConfigurableAndKeyedPartitionStream |
process(OneInputStreamProcessFunction) | NonKeyedPartitionStream | ProcessConfigurableAndNonKeyedPartitionStream | |
process(TwoOutputStreamProcessFunction, KeySelector, KeySelector) | TwoKeyedPartitionStreams | ProcessConfigurableAndTwoKeyedPartitionStreams | |
process(TwoOutputStreamProcessFunction) | TwoNonKeyedPartitionStreams | ProcessConfigurableAndTwoNonKeyedPartitionStreams | |
connectAndProcess(KeyedPartitionStream, TwoInputStreamProcessFunction); | NonKeyedPartitionStream | ProcessConfigurableAndNonKeyedPartitionStream | |
connectAndProcess( KeyedPartitionStream, TwoInputStreamProcessFunction, KeySelector) | KeyedPartitionStream | ProcessConfigurableAndKeyedPartitionStream | |
connectAndProcess(BroadcastStream, TwoInputStreamProcessFunction) | NonKeyedPartitionStream | ProcessConfigurableAndNonKeyedPartitionStream | |
toSink(Sink) | void | ProcessConfigurable | |
GlobalStream | process(OneInputStreamProcessFunction) | GlobalStream | ProcessConfigurableAndGlobalStream |
process(TwoOutputStreamProcessFunction) | TwoGlobalStreams | ProcessConfigurableAndTwoGlobalStreams | |
connectAndProcess(GlobalStream, TwoInputStreamProcessFunction) | GlobalStream | ProcessConfigurableAndGlobalStream | |
toSink(Sink) | void | ProcessConfigurable | |
BroadcastStream | connectAndProcess(KeyedPartitionStream, TwoInputStreamProcessFunction) | NonKeyedPartitionStream | ProcessConfigurableAndNonKeyedPartitionStream |
connectAndProcess(NonKeyedPartitionStream, TwoInputStreamProcessFunction) | NonKeyedPartitionStream | ProcessConfigurableAndNonKeyedPartitionStream |
Move SlotSharingGroup to flink-core-api module
...