Interface GlobalStream<T>
- All Superinterfaces:
DataStream
- All Known Subinterfaces:
GlobalStream.ProcessConfigurableAndGlobalStream<T>
This interface represents a stream that force single parallelism.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThis interface represents a configurableGlobalStream.static interfaceThis class represents a combination of twoGlobalStream. -
Method Summary
Modifier and TypeMethodDescriptionTransform 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> Transform this stream to aKeyedPartitionStream.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.shuffle()Transform this stream to a newNonKeyedPartitionStream, data will be shuffled between these two streams.
-
Method Details
-
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-GlobalStreamto perform operation with two input.processFunction- to perform operation.- Returns:
- new stream with this operation.
-
keyBy
<K> KeyedPartitionStream<K,T> keyBy(org.apache.flink.api.java.functions.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
-