Package org.apache.flink.runtime.state
Interface StateInitializationContext
-
- All Superinterfaces:
FunctionInitializationContext
,ManagedInitializationContext
- All Known Implementing Classes:
StateInitializationContextImpl
@PublicEvolving public interface StateInitializationContext extends FunctionInitializationContext
This interface provides a context in which operators can initialize by registering to managed state (i.e. state that is managed by state backends) or iterating over streams of state partitions written as raw state in a previous snapshot.Similar to the managed state from
ManagedInitializationContext
and in general, raw operator state is available to all operators, while raw keyed state is only available for operators after keyBy.For the purpose of initialization, the context signals if all state is empty (new operator) or if any state was restored from a previous execution of this operator.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Iterable<KeyGroupStatePartitionStreamProvider>
getRawKeyedStateInputs()
Returns an iterable to obtain input streams for previously stored keyed state partitions that are assigned to this operator.Iterable<StatePartitionStreamProvider>
getRawOperatorStateInputs()
Returns an iterable to obtain input streams for previously stored operator state partitions that are assigned to this operator.-
Methods inherited from interface org.apache.flink.runtime.state.ManagedInitializationContext
getKeyedStateStore, getOperatorStateStore, getRestoredCheckpointId, isRestored
-
-
-
-
Method Detail
-
getRawOperatorStateInputs
Iterable<StatePartitionStreamProvider> getRawOperatorStateInputs()
Returns an iterable to obtain input streams for previously stored operator state partitions that are assigned to this operator.
-
getRawKeyedStateInputs
Iterable<KeyGroupStatePartitionStreamProvider> getRawKeyedStateInputs()
Returns an iterable to obtain input streams for previously stored keyed state partitions that are assigned to this operator.
-
-