Interface GlobalStream<T>
-
- All Superinterfaces:
DataStream
- All Known Subinterfaces:
GlobalStream.ProcessConfigurableAndGlobalStream<T>
- All Known Implementing Classes:
GlobalStreamImpl
,ProcessConfigurableAndGlobalStreamImpl
@Experimental public interface GlobalStream<T> extends DataStream
This interface represents a stream that force single parallelism.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
GlobalStream.ProcessConfigurableAndGlobalStream<T>
This interface represents a configurableGlobalStream
.static interface
GlobalStream.TwoGlobalStreams<T1,T2>
This class represents a combination of twoGlobalStream
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BroadcastStream<T>
broadcast()
Transform this stream to a newBroadcastStream
.<T_OTHER,OUT>
GlobalStream.ProcessConfigurableAndGlobalStream<OUT>connectAndProcess(GlobalStream<T_OTHER> other, TwoInputNonBroadcastStreamProcessFunction<T,T_OTHER,OUT> processFunction)
Apply a two input operation to this and otherGlobalStream
.<K> KeyedPartitionStream<K,T>
keyBy(KeySelector<T,K> keySelector)
Transform this stream to aKeyedPartitionStream
.<OUT> GlobalStream.ProcessConfigurableAndGlobalStream<OUT>
process(OneInputStreamProcessFunction<T,OUT> processFunction)
Apply an operation to thisGlobalStream
.<OUT1,OUT2>
GlobalStream.TwoGlobalStreams<OUT1,OUT2>process(TwoOutputStreamProcessFunction<T,OUT1,OUT2> processFunction)
Apply a two output operation to thisGlobalStream
.NonKeyedPartitionStream<T>
shuffle()
Transform this stream to a newNonKeyedPartitionStream
, data will be shuffled between these two streams.ProcessConfigurable<?>
toSink(Sink<T> sink)
-
-
-
Method Detail
-
process
<OUT> GlobalStream.ProcessConfigurableAndGlobalStream<OUT> process(OneInputStreamProcessFunction<T,OUT> processFunction)
Apply an operation to thisGlobalStream
.- Parameters:
processFunction
- to perform operation.- Returns:
- new stream with this operation.
-
process
<OUT1,OUT2> GlobalStream.TwoGlobalStreams<OUT1,OUT2> process(TwoOutputStreamProcessFunction<T,OUT1,OUT2> processFunction)
Apply a two output operation to thisGlobalStream
.- Parameters:
processFunction
- to perform two output operation.- Returns:
- new stream with this operation.
-
connectAndProcess
<T_OTHER,OUT> GlobalStream.ProcessConfigurableAndGlobalStream<OUT> connectAndProcess(GlobalStream<T_OTHER> other, TwoInputNonBroadcastStreamProcessFunction<T,T_OTHER,OUT> processFunction)
Apply a two input operation to this and otherGlobalStream
.- Parameters:
other
-GlobalStream
to perform operation with two input.processFunction
- to perform operation.- Returns:
- new stream with this operation.
-
keyBy
<K> KeyedPartitionStream<K,T> keyBy(KeySelector<T,K> keySelector)
Transform this stream to aKeyedPartitionStream
.- Parameters:
keySelector
- to decide how to map data to partition.- Returns:
- the transformed stream partitioned by key.
-
shuffle
NonKeyedPartitionStream<T> shuffle()
Transform this stream to a newNonKeyedPartitionStream
, data will be shuffled between these two streams.- Returns:
- the transformed stream after shuffle.
-
broadcast
BroadcastStream<T> broadcast()
Transform this stream to a newBroadcastStream
.- Returns:
- the transformed
BroadcastStream
.
-
toSink
ProcessConfigurable<?> toSink(Sink<T> sink)
-
-