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 building StateBootstrapTransformations, which represents procedures to bootstrap new operator states with a given DataStream.

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 a SavepointWriter.

See Also: