K - The type of the key.N - The type of the namespace.V - The type of value that the state state stores.public class RocksDBReducingState<K,N,V> extends AbstractRocksDBState<K,N,V,org.apache.flink.api.common.state.ReducingState<V>> implements org.apache.flink.runtime.state.internal.InternalReducingState<K,N,V>
ReducingState implementation that stores state in RocksDB.backend, columnFamily, defaultValue, keySerializationDataOutputView, keySerializationStream, writeOptions| Constructor and Description |
|---|
RocksDBReducingState(org.rocksdb.ColumnFamilyHandle columnFamily,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<V> valueSerializer,
V defaultValue,
org.apache.flink.api.common.functions.ReduceFunction<V> reduceFunction,
RocksDBKeyedStateBackend<K> backend)
Creates a new
RocksDBReducingState. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(V value) |
V |
get() |
org.apache.flink.api.common.typeutils.TypeSerializer<K> |
getKeySerializer() |
org.apache.flink.api.common.typeutils.TypeSerializer<N> |
getNamespaceSerializer() |
org.apache.flink.api.common.typeutils.TypeSerializer<V> |
getValueSerializer() |
void |
mergeNamespaces(N target,
Collection<N> sources) |
clear, getDefaultValue, getSerializedValue, setCurrentNamespace, writeCurrentKeyWithGroupAndNamespace, writeKeyWithGroupAndNamespace, writeKeyWithGroupAndNamespaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic RocksDBReducingState(org.rocksdb.ColumnFamilyHandle columnFamily,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<V> valueSerializer,
V defaultValue,
org.apache.flink.api.common.functions.ReduceFunction<V> reduceFunction,
RocksDBKeyedStateBackend<K> backend)
RocksDBReducingState.columnFamily - The RocksDB column family that this state is associated to.namespaceSerializer - The serializer for the namespace.valueSerializer - The serializer for the state.defaultValue - The default value for the state.reduceFunction - The reduce function used for reducing state.backend - The backend for which this state is bind to.public org.apache.flink.api.common.typeutils.TypeSerializer<K> getKeySerializer()
public org.apache.flink.api.common.typeutils.TypeSerializer<N> getNamespaceSerializer()
public org.apache.flink.api.common.typeutils.TypeSerializer<V> getValueSerializer()
public V get()
public void add(V value) throws IOException
add in interface org.apache.flink.api.common.state.AppendingState<V,V>IOExceptionCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.