K
- The type of the key.N
- The type of the namespace.SV
- The type of the values in the state.S
- The type of StateSD
- The type of StateDescriptor for the State Spublic abstract class AbstractFsState<K,N,SV,S extends org.apache.flink.api.common.state.State,SD extends org.apache.flink.api.common.state.StateDescriptor<S,?>> extends AbstractHeapState<K,N,SV,S,SD,FsStateBackend>
ListState
implementations that are backed by a regular
heap hash map. The concrete implementations define how the state is checkpointed.currentKey, currentNamespace, currentNSState, keySerializer, namespaceSerializer, state, stateDesc, stateSerializer
Constructor and Description |
---|
AbstractFsState(FsStateBackend backend,
org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<SV> stateSerializer,
SD stateDesc) |
AbstractFsState(FsStateBackend backend,
org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<SV> stateSerializer,
SD stateDesc,
HashMap<N,Map<K,SV>> state) |
Modifier and Type | Method and Description |
---|---|
abstract KvStateSnapshot<K,N,S,SD,FsStateBackend> |
createHeapSnapshot(org.apache.flink.core.fs.Path filePath) |
KvStateSnapshot<K,N,S,SD,FsStateBackend> |
snapshot(long checkpointId,
long timestamp)
Creates a snapshot of this state.
|
clear, dispose, getKeySerializer, getNamespaceSerializer, setCurrentKey, setCurrentNamespace, size
public AbstractFsState(FsStateBackend backend, org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, org.apache.flink.api.common.typeutils.TypeSerializer<SV> stateSerializer, SD stateDesc)
public AbstractFsState(FsStateBackend backend, org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, org.apache.flink.api.common.typeutils.TypeSerializer<SV> stateSerializer, SD stateDesc, HashMap<N,Map<K,SV>> state)
public abstract KvStateSnapshot<K,N,S,SD,FsStateBackend> createHeapSnapshot(org.apache.flink.core.fs.Path filePath)
public KvStateSnapshot<K,N,S,SD,FsStateBackend> snapshot(long checkpointId, long timestamp) throws Exception
KvState
checkpointId
- The ID of the checkpoint for which the snapshot should be created.timestamp
- The timestamp of the checkpoint.Exception
- Exceptions during snapshotting the state should be forwarded, so the system
can react to failed snapshots.Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.