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 buildingStateBootstrapTransformation
s, 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
BootstrapTransformation
s for non-keyed and keyed state. The built bootstrap transformations can then used with aSavepointWriter
.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> OneInputStateTransformation<T>
bootstrapWith(DataStream<T> stream)
Create a newOneInputStateTransformation
from aDataStream
.
-
-
-
Method Detail
-
bootstrapWith
public static <T> OneInputStateTransformation<T> bootstrapWith(DataStream<T> stream)
Create a newOneInputStateTransformation
from aDataStream
.- Type Parameters:
T
- The type of the input.- Parameters:
stream
- A data stream of elements.- Returns:
- A
OneInputStateTransformation
.
-
-