@PublicEvolving public final class OperatorTransformation extends Object
BootstrapTransformations,
which represents procedures to bootstrap new operator states with a given DataSet.
DataSet<StateData> stateData = ...;
// to bootstrap non-keyed state:
BootstrapTransformation<StateData> nonKeyedStateBootstrap = OperatorTransformation
.bootstrapWith(stateData)
.transform(new StateBootstrapFunction<StateData>() {...})
// to bootstrap keyed state:
BootstrapTransformation<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 be registered with your ExistingSavepoint or Savepoint
prior to writing it.
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> OneInputOperatorTransformation<T> |
bootstrapWith(org.apache.flink.api.java.DataSet<T> dataSet)
Create a new
OperatorTransformation from a DataSet. |
public static <T> OneInputOperatorTransformation<T> bootstrapWith(org.apache.flink.api.java.DataSet<T> dataSet)
OperatorTransformation from a DataSet.T - The type of the input.dataSet - A dataset of elements.OneInputOperatorTransformation.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.