Interface StreamTaskStateInitializer
- All Known Implementing Classes:
StreamTaskStateInitializerImpl
public interface StreamTaskStateInitializer
This is the interface through which stream task expose a
StreamOperatorStateContext to
their operators. Operators, in turn, can use the context to initialize everything connected to
their state, such as backends or a timer service manager.-
Method Summary
Modifier and TypeMethodDescriptionstreamOperatorStateContext(OperatorID operatorID, String operatorClassName, ProcessingTimeService processingTimeService, KeyContext keyContext, org.apache.flink.api.common.typeutils.TypeSerializer<?> keySerializer, org.apache.flink.core.fs.CloseableRegistry streamTaskCloseableRegistry, org.apache.flink.metrics.MetricGroup metricGroup, double managedMemoryFraction, boolean isUsingCustomRawKeyedState, boolean isAsyncState) Returns theStreamOperatorStateContextfor anAbstractStreamOperatorthat runs in the stream task that owns this manager.
-
Method Details
-
streamOperatorStateContext
StreamOperatorStateContext streamOperatorStateContext(@Nonnull OperatorID operatorID, @Nonnull String operatorClassName, @Nonnull ProcessingTimeService processingTimeService, @Nonnull KeyContext keyContext, @Nullable org.apache.flink.api.common.typeutils.TypeSerializer<?> keySerializer, @Nonnull org.apache.flink.core.fs.CloseableRegistry streamTaskCloseableRegistry, @Nonnull org.apache.flink.metrics.MetricGroup metricGroup, double managedMemoryFraction, boolean isUsingCustomRawKeyedState, boolean isAsyncState) throws Exception Returns theStreamOperatorStateContextfor anAbstractStreamOperatorthat runs in the stream task that owns this manager.- Parameters:
operatorID- the id of the operator for which the context is created. Cannot be null.operatorClassName- the classname of the operator instance for which the context is created. Cannot be null.processingTimeService-keyContext- the key context of the operator instance for which the context is created Cannot be null.keySerializer- the key-serializer for the operator. Can be null.streamTaskCloseableRegistry- the closeable registry to which created closeable objects will be registered.metricGroup- the parent metric group for all statebackend metricsmanagedMemoryFraction- the managed memory fraction of the operator for state backendisUsingCustomRawKeyedState- flag indicating whether or not theAbstractStreamOperatoris writing custom raw keyed state.- Returns:
- a context from which the given operator can initialize everything related to state.
- Throws:
Exception- when something went wrong while creating the context.
-