public final class StreamUtils extends Object
| Constructor and Description |
|---|
StreamUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> DataStreamV2SinkTransformation<T,T> |
addSinkOperator(AbstractDataStream<T> inputStream,
org.apache.flink.api.connector.dsv2.Sink<T> sink,
org.apache.flink.api.common.typeinfo.TypeInformation<T> typeInformation)
Add sink operator to the input stream.
|
static <T,R,K> org.apache.flink.streaming.api.transformations.OneInputTransformation<T,R> |
getOneInputKeyedTransformation(String operatorName,
AbstractDataStream<T> inputStream,
org.apache.flink.api.common.typeinfo.TypeInformation<R> outTypeInformation,
org.apache.flink.streaming.api.operators.OneInputStreamOperator<T,R> operator,
org.apache.flink.api.java.functions.KeySelector<T,K> keySelector,
org.apache.flink.api.common.typeinfo.TypeInformation<K> keyType)
Construct and return a
OneInputTransformation from keyed input streams. |
static <T,R> org.apache.flink.streaming.api.transformations.OneInputTransformation<T,R> |
getOneInputTransformation(String operatorName,
AbstractDataStream<T> inputStream,
org.apache.flink.api.common.typeinfo.TypeInformation<R> outTypeInformation,
org.apache.flink.streaming.api.operators.OneInputStreamOperator<T,R> operator)
Construct and return a
OneInputTransformation from non-keyed input streams. |
static <IN,OUT> org.apache.flink.api.common.typeinfo.TypeInformation<OUT> |
getOutputTypeForOneInputProcessFunction(org.apache.flink.datastream.api.function.OneInputStreamProcessFunction<IN,OUT> processFunction,
org.apache.flink.api.common.typeinfo.TypeInformation<IN> inTypeInformation)
Get the output type information for
OneInputStreamProcessFunction from input type
information. |
static <IN1,IN2,OUT> |
getOutputTypeForTwoInputBroadcastProcessFunction(org.apache.flink.datastream.api.function.TwoInputBroadcastStreamProcessFunction<IN1,IN2,OUT> processFunction,
org.apache.flink.api.common.typeinfo.TypeInformation<IN1> in1TypeInformation,
org.apache.flink.api.common.typeinfo.TypeInformation<IN2> in2TypeInformation)
Get the output type information for
TwoInputBroadcastStreamProcessFunction from two
input type information . |
static <IN1,IN2,OUT> |
getOutputTypeForTwoInputNonBroadcastProcessFunction(org.apache.flink.datastream.api.function.TwoInputNonBroadcastStreamProcessFunction<IN1,IN2,OUT> processFunction,
org.apache.flink.api.common.typeinfo.TypeInformation<IN1> in1TypeInformation,
org.apache.flink.api.common.typeinfo.TypeInformation<IN2> in2TypeInformation)
Get the output type information for
TwoInputNonBroadcastStreamProcessFunction from
two input type information . |
static <IN,OUT1,OUT2> |
getOutputTypesForTwoOutputProcessFunction(org.apache.flink.datastream.api.function.TwoOutputStreamProcessFunction<IN,OUT1,OUT2> twoOutputStreamProcessFunction,
org.apache.flink.api.common.typeinfo.TypeInformation<IN> inTypeInformation)
Get output types information for
TwoOutputStreamProcessFunction from the input type
information. |
static <IN1,IN2,OUT> |
getTwoInputTransformation(String operatorName,
AbstractDataStream<IN1> inputStream1,
AbstractDataStream<IN2> inputStream2,
org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outTypeInformation,
org.apache.flink.streaming.api.operators.TwoInputStreamOperator<IN1,IN2,OUT> operator)
Construct and return a
TwoInputTransformation from two input streams. |
static <T,R> AbstractDataStream<R> |
transformOneInputOperator(String operatorName,
AbstractDataStream<T> inputStream,
org.apache.flink.api.common.typeinfo.TypeInformation<R> outTypeInfo,
org.apache.flink.streaming.api.operators.StreamOperatorFactory<R> operatorFactory)
Construct and return a new DataStream with one input operator.
|
static void |
validateStates(Set<org.apache.flink.api.common.state.StateDeclaration> inputStateDeclarations,
Set<org.apache.flink.api.common.state.StateDeclaration.RedistributionMode> invalidStateDeclarations)
Wrap a
GlobalStreamImpl with configure handle. |
static <T> org.apache.flink.datastream.api.stream.GlobalStream.ProcessConfigurableAndGlobalStream<T> |
wrapWithConfigureHandle(GlobalStreamImpl<T> stream)
Wrap a
GlobalStreamImpl with configure handle. |
static <K,T> org.apache.flink.datastream.api.stream.KeyedPartitionStream.ProcessConfigurableAndKeyedPartitionStream<K,T> |
wrapWithConfigureHandle(KeyedPartitionStreamImpl<K,T> stream)
Wrap a
KeyedPartitionStreamImpl with configure handle. |
static <T> org.apache.flink.datastream.api.stream.NonKeyedPartitionStream.ProcessConfigurableAndNonKeyedPartitionStream<T> |
wrapWithConfigureHandle(NonKeyedPartitionStreamImpl<T> stream)
Wrap a
NonKeyedPartitionStreamImpl with configure handle. |
public static <IN,OUT> org.apache.flink.api.common.typeinfo.TypeInformation<OUT> getOutputTypeForOneInputProcessFunction(org.apache.flink.datastream.api.function.OneInputStreamProcessFunction<IN,OUT> processFunction,
org.apache.flink.api.common.typeinfo.TypeInformation<IN> inTypeInformation)
OneInputStreamProcessFunction from input type
information.public static <IN1,IN2,OUT> org.apache.flink.api.common.typeinfo.TypeInformation<OUT> getOutputTypeForTwoInputNonBroadcastProcessFunction(org.apache.flink.datastream.api.function.TwoInputNonBroadcastStreamProcessFunction<IN1,IN2,OUT> processFunction,
org.apache.flink.api.common.typeinfo.TypeInformation<IN1> in1TypeInformation,
org.apache.flink.api.common.typeinfo.TypeInformation<IN2> in2TypeInformation)
TwoInputNonBroadcastStreamProcessFunction from
two input type information .public static <IN1,IN2,OUT> org.apache.flink.api.common.typeinfo.TypeInformation<OUT> getOutputTypeForTwoInputBroadcastProcessFunction(org.apache.flink.datastream.api.function.TwoInputBroadcastStreamProcessFunction<IN1,IN2,OUT> processFunction,
org.apache.flink.api.common.typeinfo.TypeInformation<IN1> in1TypeInformation,
org.apache.flink.api.common.typeinfo.TypeInformation<IN2> in2TypeInformation)
TwoInputBroadcastStreamProcessFunction from two
input type information .public static <IN,OUT1,OUT2> org.apache.flink.api.java.tuple.Tuple2<org.apache.flink.api.common.typeinfo.TypeInformation<OUT1>,org.apache.flink.api.common.typeinfo.TypeInformation<OUT2>> getOutputTypesForTwoOutputProcessFunction(org.apache.flink.datastream.api.function.TwoOutputStreamProcessFunction<IN,OUT1,OUT2> twoOutputStreamProcessFunction,
org.apache.flink.api.common.typeinfo.TypeInformation<IN> inTypeInformation)
TwoOutputStreamProcessFunction from the input type
information.public static <T,R> org.apache.flink.streaming.api.transformations.OneInputTransformation<T,R> getOneInputTransformation(String operatorName, AbstractDataStream<T> inputStream, org.apache.flink.api.common.typeinfo.TypeInformation<R> outTypeInformation, org.apache.flink.streaming.api.operators.OneInputStreamOperator<T,R> operator)
OneInputTransformation from non-keyed input streams.public static <T,R,K> org.apache.flink.streaming.api.transformations.OneInputTransformation<T,R> getOneInputKeyedTransformation(String operatorName, AbstractDataStream<T> inputStream, org.apache.flink.api.common.typeinfo.TypeInformation<R> outTypeInformation, org.apache.flink.streaming.api.operators.OneInputStreamOperator<T,R> operator, org.apache.flink.api.java.functions.KeySelector<T,K> keySelector, org.apache.flink.api.common.typeinfo.TypeInformation<K> keyType)
OneInputTransformation from keyed input streams.public static <IN1,IN2,OUT> org.apache.flink.streaming.api.transformations.TwoInputTransformation<IN1,IN2,OUT> getTwoInputTransformation(String operatorName, AbstractDataStream<IN1> inputStream1, AbstractDataStream<IN2> inputStream2, org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outTypeInformation, org.apache.flink.streaming.api.operators.TwoInputStreamOperator<IN1,IN2,OUT> operator)
TwoInputTransformation from two input streams.public static <T,R> AbstractDataStream<R> transformOneInputOperator(String operatorName, AbstractDataStream<T> inputStream, org.apache.flink.api.common.typeinfo.TypeInformation<R> outTypeInfo, org.apache.flink.streaming.api.operators.StreamOperatorFactory<R> operatorFactory)
public static <T> DataStreamV2SinkTransformation<T,T> addSinkOperator(AbstractDataStream<T> inputStream, org.apache.flink.api.connector.dsv2.Sink<T> sink, org.apache.flink.api.common.typeinfo.TypeInformation<T> typeInformation)
public static <T> org.apache.flink.datastream.api.stream.NonKeyedPartitionStream.ProcessConfigurableAndNonKeyedPartitionStream<T> wrapWithConfigureHandle(NonKeyedPartitionStreamImpl<T> stream)
NonKeyedPartitionStreamImpl with configure handle.public static <K,T> org.apache.flink.datastream.api.stream.KeyedPartitionStream.ProcessConfigurableAndKeyedPartitionStream<K,T> wrapWithConfigureHandle(KeyedPartitionStreamImpl<K,T> stream)
KeyedPartitionStreamImpl with configure handle.public static <T> org.apache.flink.datastream.api.stream.GlobalStream.ProcessConfigurableAndGlobalStream<T> wrapWithConfigureHandle(GlobalStreamImpl<T> stream)
GlobalStreamImpl with configure handle.public static void validateStates(Set<org.apache.flink.api.common.state.StateDeclaration> inputStateDeclarations, Set<org.apache.flink.api.common.state.StateDeclaration.RedistributionMode> invalidStateDeclarations)
GlobalStreamImpl with configure handle.Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.