K - The type of the key.N - The type of the namespace.T - The type of the values that can be folded into the state.ACC - The type of the value in the folding state.public class RocksDBFoldingState<K,N,T,ACC> extends AbstractRocksDBState<K,N,org.apache.flink.api.common.state.FoldingState<T,ACC>,org.apache.flink.api.common.state.FoldingStateDescriptor<T,ACC>,ACC> implements org.apache.flink.api.common.state.FoldingState<T,ACC>
FoldingState implementation that stores state in RocksDB.backend, columnFamily, keySerializationDataOutputView, keySerializationStream, stateDesc| Constructor and Description |
|---|
RocksDBFoldingState(org.rocksdb.ColumnFamilyHandle columnFamily,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
org.apache.flink.api.common.state.FoldingStateDescriptor<T,ACC> stateDesc,
RocksDBKeyedStateBackend<K> backend)
Creates a new
RocksDBFoldingState. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T value) |
ACC |
get() |
clear, getSerializedValue, setCurrentNamespace, writeCurrentKeyWithGroupAndNamespace, writeKeyWithGroupAndNamespacepublic RocksDBFoldingState(org.rocksdb.ColumnFamilyHandle columnFamily,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
org.apache.flink.api.common.state.FoldingStateDescriptor<T,ACC> stateDesc,
RocksDBKeyedStateBackend<K> backend)
RocksDBFoldingState.namespaceSerializer - The serializer for the namespace.stateDesc - The state identifier for the state. This contains name
and can create a default state value.public ACC get()
public void add(T value) throws IOException
add in interface org.apache.flink.api.common.state.AppendingState<T,ACC>IOExceptionCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.