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 State,SD extends 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,
TypeSerializer<K> keySerializer,
TypeSerializer<N> namespaceSerializer,
TypeSerializer<SV> stateSerializer,
SD stateDesc) |
AbstractFsState(FsStateBackend backend,
TypeSerializer<K> keySerializer,
TypeSerializer<N> namespaceSerializer,
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(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, TypeSerializer<K> keySerializer, TypeSerializer<N> namespaceSerializer, TypeSerializer<SV> stateSerializer, SD stateDesc)
public AbstractFsState(FsStateBackend backend, TypeSerializer<K> keySerializer, TypeSerializer<N> namespaceSerializer, TypeSerializer<SV> stateSerializer, SD stateDesc, HashMap<N,Map<K,SV>> state)
public abstract KvStateSnapshot<K,N,S,SD,FsStateBackend> createHeapSnapshot(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–2017 The Apache Software Foundation. All rights reserved.