Package org.apache.flink.state.api
Class OperatorTransformation
- java.lang.Object
-
- org.apache.flink.state.api.OperatorTransformation
-
@PublicEvolving public final class OperatorTransformation extends Object
This class provides the entry point for buildingStateBootstrapTransformations, which represents procedures to bootstrap new operator states with a givenDataStream.Example usage
DataStream<StateData> stateData = ...; // to bootstrap non-keyed state: StateBootstrapTransformation<StateData> nonKeyedStateBootstrap = OperatorTransformation .bootstrapWith(stateData) .transform(new StateBootstrapFunction<StateData>() {...}) // to bootstrap keyed state: StateBootstrapTransformation<StateData> keyedStateBootstrap = OperatorTransformation .bootstrapWith(stateData) .keyBy(new KeySelector<StateData, KeyType>() {...}) .transform(new KeyedStateBootstrapFunction<KeyType, StateData>() {...})The code example above demonstrates how to create
BootstrapTransformations for non-keyed and keyed state. The built bootstrap transformations can then used with aSavepointWriter.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T> OneInputOperatorTransformation<T>bootstrapWith(org.apache.flink.api.java.DataSet<T> dataSet)Deprecated.usebootstrapWith(DataStream)to bootstrap a savepoint using the data stream api under batch execution.static <T> OneInputOperatorTransformation<T>bootstrapWith(org.apache.flink.api.java.DataSet<T> dataSet, long checkpointId)Deprecated.usebootstrapWith(DataStream)to bootstrap a savepoint using the data stream api under batch execution.static <T> OneInputStateTransformation<T>bootstrapWith(org.apache.flink.streaming.api.datastream.DataStream<T> stream)Create a newOneInputStateTransformationfrom aDataStream.static <T> OneInputStateTransformation<T>bootstrapWith(org.apache.flink.streaming.api.datastream.DataStream<T> stream, long checkpointId)Create a newOneInputStateTransformationfrom aDataStream.
-
-
-
Method Detail
-
bootstrapWith
@Deprecated public static <T> OneInputOperatorTransformation<T> bootstrapWith(org.apache.flink.api.java.DataSet<T> dataSet)
Deprecated.usebootstrapWith(DataStream)to bootstrap a savepoint using the data stream api under batch execution.Create a newOperatorTransformationfrom aDataSet.- Type Parameters:
T- The type of the input.- Parameters:
dataSet- A dataset of elements.- Returns:
- A
OneInputOperatorTransformation.
-
bootstrapWith
@Deprecated public static <T> OneInputOperatorTransformation<T> bootstrapWith(org.apache.flink.api.java.DataSet<T> dataSet, long checkpointId)
Deprecated.usebootstrapWith(DataStream)to bootstrap a savepoint using the data stream api under batch execution.Create a newOperatorTransformationfrom aDataSet.- Type Parameters:
T- The type of the input.- Parameters:
dataSet- A dataset of elements.checkpointId- checkpoint ID.- Returns:
- A
OneInputOperatorTransformation.
-
bootstrapWith
public static <T> OneInputStateTransformation<T> bootstrapWith(org.apache.flink.streaming.api.datastream.DataStream<T> stream)
Create a newOneInputStateTransformationfrom aDataStream.- Type Parameters:
T- The type of the input.- Parameters:
stream- A data stream of elements.- Returns:
- A
OneInputStateTransformation.
-
bootstrapWith
public static <T> OneInputStateTransformation<T> bootstrapWith(org.apache.flink.streaming.api.datastream.DataStream<T> stream, long checkpointId)
Create a newOneInputStateTransformationfrom aDataStream.- Type Parameters:
T- The type of the input.- Parameters:
stream- A data stream of elements.checkpointId- checkpoint ID.- Returns:
- A
OneInputStateTransformation.
-
-