@Internal public class StreamOperatorStateHandler extends Object
StreamOperator
implementations.Modifier and Type | Class and Description |
---|---|
static interface |
StreamOperatorStateHandler.CheckpointedStreamOperator
Custom state handling hooks to be invoked by
StreamOperatorStateHandler . |
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
StreamOperatorStateHandler(StreamOperatorStateContext context,
ExecutionConfig executionConfig,
CloseableRegistry closeableRegistry) |
public StreamOperatorStateHandler(StreamOperatorStateContext context, ExecutionConfig executionConfig, CloseableRegistry closeableRegistry)
public void initializeOperatorState(StreamOperatorStateHandler.CheckpointedStreamOperator streamOperator) throws Exception
Exception
public OperatorSnapshotFutures snapshotState(StreamOperatorStateHandler.CheckpointedStreamOperator streamOperator, Optional<InternalTimeServiceManager<?>> timeServiceManager, String operatorName, long checkpointId, long timestamp, CheckpointOptions checkpointOptions, CheckpointStreamFactory factory) throws CheckpointException
CheckpointException
public void notifyCheckpointComplete(long checkpointId) throws Exception
Exception
public void notifyCheckpointAborted(long checkpointId) throws Exception
Exception
public <K> KeyedStateBackend<K> getKeyedStateBackend()
public OperatorStateBackend getOperatorStateBackend()
public <N,S extends State,T> S getOrCreateKeyedState(TypeSerializer<N> namespaceSerializer, StateDescriptor<S,T> stateDescriptor) throws Exception
Exception
protected <S extends State,N> S getPartitionedState(N namespace, TypeSerializer<N> namespaceSerializer, StateDescriptor<S,?> stateDescriptor) throws Exception
IllegalStateException
- Thrown, if the key/value state was already initialized.Exception
- Thrown, if the state backend cannot create the key/value state.public void setCurrentKey(Object key)
public Object getCurrentKey()
public Optional<KeyedStateStore> getKeyedStateStore()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.