@PublicEvolving public final class OperatorTransformation extends Object
StateBootstrapTransformation
s, which
represents procedures to bootstrap new operator states with a given DataStream
.
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 a SavepointWriter
.
Modifier and Type | Method and Description |
---|---|
static <T> OneInputOperatorTransformation<T> |
bootstrapWith(DataSet<T> dataSet)
Deprecated.
use
bootstrapWith(DataStream) to bootstrap a savepoint using the data
stream api under batch execution. |
static <T> OneInputStateTransformation<T> |
bootstrapWith(DataStream<T> stream)
Create a new
OneInputStateTransformation from a DataStream . |
@Deprecated public static <T> OneInputOperatorTransformation<T> bootstrapWith(DataSet<T> dataSet)
bootstrapWith(DataStream)
to bootstrap a savepoint using the data
stream api under batch execution.OperatorTransformation
from a DataSet
.T
- The type of the input.dataSet
- A dataset of elements.OneInputOperatorTransformation
.public static <T> OneInputStateTransformation<T> bootstrapWith(DataStream<T> stream)
OneInputStateTransformation
from a DataStream
.T
- The type of the input.stream
- A data stream of elements.OneInputStateTransformation
.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.