K - The type of the key.N - The type of the namespace.S - The type of State.SD - The type of StateDescriptor.public abstract class AbstractRocksDBState<K,N,S extends org.apache.flink.api.common.state.State,SD extends org.apache.flink.api.common.state.StateDescriptor<S,?>> extends Object implements org.apache.flink.runtime.state.KvState<K,N,S,SD,RocksDBStateBackend>, org.apache.flink.api.common.state.State
State implementations that store state in a RocksDB database.
State is not stored in this class but in the RocksDB instance that
the RocksDBStateBackend manages and checkpoints.
| Modifier and Type | Field and Description |
|---|---|
protected RocksDBStateBackend |
backend
Backend that holds the actual RocksDB instance where we store state
|
protected org.rocksdb.ColumnFamilyHandle |
columnFamily
The column family of this particular instance of state
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRocksDBState(org.rocksdb.ColumnFamilyHandle columnFamily,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
RocksDBStateBackend backend)
Creates a new RocksDB backed state.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
dispose() |
void |
setCurrentKey(K key) |
void |
setCurrentNamespace(N namespace) |
org.apache.flink.runtime.state.KvStateSnapshot<K,N,S,SD,RocksDBStateBackend> |
snapshot(long checkpointId,
long timestamp) |
protected void |
writeKeyAndNamespace(org.apache.flink.core.memory.DataOutputView out) |
protected RocksDBStateBackend backend
protected org.rocksdb.ColumnFamilyHandle columnFamily
protected AbstractRocksDBState(org.rocksdb.ColumnFamilyHandle columnFamily,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
RocksDBStateBackend backend)
namespaceSerializer - The serializer for the namespace.public void clear()
clear in interface org.apache.flink.api.common.state.Stateprotected void writeKeyAndNamespace(org.apache.flink.core.memory.DataOutputView out)
throws IOException
IOExceptionpublic void setCurrentNamespace(N namespace)
public void dispose()
public void setCurrentKey(K key)
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.