K
- The type of the key in the snapshot state.V
- The type of the value in the snapshot state.public class FsHeapKvStateSnapshot<K,V> extends AbstractFileState implements KvStateSnapshot<K,V,FsStateBackend>
Constructor and Description |
---|
FsHeapKvStateSnapshot(org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<V> valueSerializer,
org.apache.flink.core.fs.Path filePath)
Creates a new state snapshot with data in the file system.
|
Modifier and Type | Method and Description |
---|---|
FsHeapKvState<K,V> |
restoreState(FsStateBackend stateBackend,
org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<V> valueSerializer,
V defaultValue,
ClassLoader classLoader)
Loads the key/value state back from this snapshot.
|
discardState, getFilePath, getFileSystem
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
discardState
public FsHeapKvStateSnapshot(org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<V> valueSerializer, org.apache.flink.core.fs.Path filePath)
keySerializer
- The serializer for the keys.valueSerializer
- The serializer for the values.filePath
- The path where the snapshot data is stored.public FsHeapKvState<K,V> restoreState(FsStateBackend stateBackend, org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<V> valueSerializer, V defaultValue, ClassLoader classLoader) throws Exception
KvStateSnapshot
restoreState
in interface KvStateSnapshot<K,V,FsStateBackend>
stateBackend
- The state backend that created this snapshot and can restore the key/value state
from this snapshot.keySerializer
- The serializer for the keys.valueSerializer
- The serializer for the values.defaultValue
- The value that is returned when no other value has been associated with a key, yet.classLoader
- The class loader for user-defined types.Exception
- Exceptions can occur during the state loading and are forwarded.Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.