@Internal public class DefaultOperatorStateBackend extends Object implements OperatorStateBackend
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
DEFAULT_OPERATOR_STATE_NAME
The default namespace for state in cases where no state name is provided
|
| 构造器和说明 |
|---|
DefaultOperatorStateBackend(org.apache.flink.api.common.ExecutionConfig executionConfig,
org.apache.flink.core.fs.CloseableRegistry closeStreamOnCancelRegistry,
Map<String,PartitionableListState<?>> registeredOperatorStates,
Map<String,BackendWritableBroadcastState<?,?>> registeredBroadcastStates,
Map<String,PartitionableListState<?>> accessedStatesByName,
Map<String,BackendWritableBroadcastState<?,?>> accessedBroadcastStatesByName,
SnapshotStrategyRunner<OperatorStateHandle,?> snapshotStrategyRunner) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
void |
dispose() |
<K,V> org.apache.flink.api.common.state.BroadcastState<K,V> |
getBroadcastState(org.apache.flink.api.common.state.MapStateDescriptor<K,V> stateDescriptor) |
org.apache.flink.api.common.ExecutionConfig |
getExecutionConfig() |
<S> org.apache.flink.api.common.state.ListState<S> |
getListState(org.apache.flink.api.common.state.ListStateDescriptor<S> stateDescriptor) |
Set<String> |
getRegisteredBroadcastStateNames() |
Set<String> |
getRegisteredStateNames() |
<S> org.apache.flink.api.common.state.ListState<S> |
getUnionListState(org.apache.flink.api.common.state.ListStateDescriptor<S> stateDescriptor) |
RunnableFuture<SnapshotResult<OperatorStateHandle>> |
snapshot(long checkpointId,
long timestamp,
CheckpointStreamFactory streamFactory,
CheckpointOptions checkpointOptions)
Operation that writes a snapshot into a stream that is provided by the given
CheckpointStreamFactory and returns a @RunnableFuture that gives a state handle to
the snapshot. |
public DefaultOperatorStateBackend(org.apache.flink.api.common.ExecutionConfig executionConfig,
org.apache.flink.core.fs.CloseableRegistry closeStreamOnCancelRegistry,
Map<String,PartitionableListState<?>> registeredOperatorStates,
Map<String,BackendWritableBroadcastState<?,?>> registeredBroadcastStates,
Map<String,PartitionableListState<?>> accessedStatesByName,
Map<String,BackendWritableBroadcastState<?,?>> accessedBroadcastStatesByName,
SnapshotStrategyRunner<OperatorStateHandle,?> snapshotStrategyRunner)
public org.apache.flink.api.common.ExecutionConfig getExecutionConfig()
public Set<String> getRegisteredStateNames()
getRegisteredStateNames 在接口中 org.apache.flink.api.common.state.OperatorStateStorepublic Set<String> getRegisteredBroadcastStateNames()
getRegisteredBroadcastStateNames 在接口中 org.apache.flink.api.common.state.OperatorStateStorepublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionpublic void dispose()
dispose 在接口中 OperatorStateBackenddispose 在接口中 org.apache.flink.util.Disposablepublic <K,V> org.apache.flink.api.common.state.BroadcastState<K,V> getBroadcastState(org.apache.flink.api.common.state.MapStateDescriptor<K,V> stateDescriptor)
throws org.apache.flink.util.StateMigrationException
getBroadcastState 在接口中 org.apache.flink.api.common.state.OperatorStateStoreorg.apache.flink.util.StateMigrationExceptionpublic <S> org.apache.flink.api.common.state.ListState<S> getListState(org.apache.flink.api.common.state.ListStateDescriptor<S> stateDescriptor)
throws Exception
getListState 在接口中 org.apache.flink.api.common.state.OperatorStateStoreExceptionpublic <S> org.apache.flink.api.common.state.ListState<S> getUnionListState(org.apache.flink.api.common.state.ListStateDescriptor<S> stateDescriptor)
throws Exception
getUnionListState 在接口中 org.apache.flink.api.common.state.OperatorStateStoreException@Nonnull public RunnableFuture<SnapshotResult<OperatorStateHandle>> snapshot(long checkpointId, long timestamp, @Nonnull CheckpointStreamFactory streamFactory, @Nonnull CheckpointOptions checkpointOptions) throws Exception
SnapshotableCheckpointStreamFactory and returns a @RunnableFuture that gives a state handle to
the snapshot. It is up to the implementation if the operation is performed synchronous or
asynchronous. In the later case, the returned Runnable must be executed first before
obtaining the handle.snapshot 在接口中 Snapshotable<SnapshotResult<OperatorStateHandle>>checkpointId - The ID of the checkpoint.timestamp - The timestamp of the checkpoint.streamFactory - The factory that we can use for writing our state to streams.checkpointOptions - Options for how to perform this checkpoint.StateObject.ExceptionCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.