public class StreamTaskStateInitializerImpl extends Object implements StreamTaskStateInitializer
StreamTaskStateInitializer. This class obtains the state to create
StreamOperatorStateContext objects for stream operators from the TaskStateManager of the task that
runs the stream task and hence the operator.
This implementation operates on top a TaskStateManager, from which it receives everything required to
restore state in the backends from checkpoints or savepoints.
| Constructor and Description |
|---|
StreamTaskStateInitializerImpl(org.apache.flink.runtime.execution.Environment environment,
org.apache.flink.runtime.state.StateBackend stateBackend) |
| Modifier and Type | Method and Description |
|---|---|
protected <K> InternalTimeServiceManager<K> |
internalTimeServiceManager(org.apache.flink.runtime.state.AbstractKeyedStateBackend<K> keyedStatedBackend,
KeyContext keyContext,
ProcessingTimeService processingTimeService,
Iterable<org.apache.flink.runtime.state.KeyGroupStatePartitionStreamProvider> rawKeyedStates) |
protected <K> org.apache.flink.runtime.state.AbstractKeyedStateBackend<K> |
keyedStatedBackend(org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer,
String operatorIdentifierText,
org.apache.flink.runtime.checkpoint.PrioritizedOperatorSubtaskState prioritizedOperatorSubtaskStates,
org.apache.flink.core.fs.CloseableRegistry backendCloseableRegistry,
org.apache.flink.metrics.MetricGroup metricGroup) |
protected org.apache.flink.runtime.state.OperatorStateBackend |
operatorStateBackend(String operatorIdentifierText,
org.apache.flink.runtime.checkpoint.PrioritizedOperatorSubtaskState prioritizedOperatorSubtaskStates,
org.apache.flink.core.fs.CloseableRegistry backendCloseableRegistry) |
protected org.apache.flink.util.CloseableIterable<org.apache.flink.runtime.state.KeyGroupStatePartitionStreamProvider> |
rawKeyedStateInputs(Iterator<org.apache.flink.runtime.checkpoint.StateObjectCollection<org.apache.flink.runtime.state.KeyedStateHandle>> restoreStateAlternatives) |
protected org.apache.flink.util.CloseableIterable<org.apache.flink.runtime.state.StatePartitionStreamProvider> |
rawOperatorStateInputs(Iterator<org.apache.flink.runtime.checkpoint.StateObjectCollection<org.apache.flink.runtime.state.OperatorStateHandle>> restoreStateAlternatives) |
StreamOperatorStateContext |
streamOperatorStateContext(org.apache.flink.runtime.jobgraph.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)
Returns the
StreamOperatorStateContext for an AbstractStreamOperator that runs in the stream
task that owns this manager. |
public StreamTaskStateInitializerImpl(org.apache.flink.runtime.execution.Environment environment,
org.apache.flink.runtime.state.StateBackend stateBackend)
public StreamOperatorStateContext streamOperatorStateContext(@Nonnull org.apache.flink.runtime.jobgraph.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) throws Exception
StreamTaskStateInitializerStreamOperatorStateContext for an AbstractStreamOperator that runs in the stream
task that owns this manager.streamOperatorStateContext in interface StreamTaskStateInitializeroperatorID - 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.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 metricsException - when something went wrong while creating the context.protected <K> InternalTimeServiceManager<K> internalTimeServiceManager(org.apache.flink.runtime.state.AbstractKeyedStateBackend<K> keyedStatedBackend, KeyContext keyContext, ProcessingTimeService processingTimeService, Iterable<org.apache.flink.runtime.state.KeyGroupStatePartitionStreamProvider> rawKeyedStates) throws Exception
Exceptionprotected org.apache.flink.runtime.state.OperatorStateBackend operatorStateBackend(String operatorIdentifierText, org.apache.flink.runtime.checkpoint.PrioritizedOperatorSubtaskState prioritizedOperatorSubtaskStates, org.apache.flink.core.fs.CloseableRegistry backendCloseableRegistry) throws Exception
Exceptionprotected <K> org.apache.flink.runtime.state.AbstractKeyedStateBackend<K> keyedStatedBackend(org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer,
String operatorIdentifierText,
org.apache.flink.runtime.checkpoint.PrioritizedOperatorSubtaskState prioritizedOperatorSubtaskStates,
org.apache.flink.core.fs.CloseableRegistry backendCloseableRegistry,
org.apache.flink.metrics.MetricGroup metricGroup)
throws Exception
Exceptionprotected org.apache.flink.util.CloseableIterable<org.apache.flink.runtime.state.StatePartitionStreamProvider> rawOperatorStateInputs(Iterator<org.apache.flink.runtime.checkpoint.StateObjectCollection<org.apache.flink.runtime.state.OperatorStateHandle>> restoreStateAlternatives)
protected org.apache.flink.util.CloseableIterable<org.apache.flink.runtime.state.KeyGroupStatePartitionStreamProvider> rawKeyedStateInputs(Iterator<org.apache.flink.runtime.checkpoint.StateObjectCollection<org.apache.flink.runtime.state.KeyedStateHandle>> restoreStateAlternatives)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.