K - The type of the keyN - The type of the namespaceT - The type of the values that aggregated into the stateACC - The type of the value stored in the state (the accumulator type)R - The type of the value returned from the statepublic class RocksDBAggregatingState<K,N,T,ACC,R> extends AbstractRocksDBState<K,N,org.apache.flink.api.common.state.AggregatingState<T,R>,org.apache.flink.api.common.state.AggregatingStateDescriptor<T,ACC,R>,ACC> implements org.apache.flink.runtime.state.internal.InternalAggregatingState<N,T,R>
AggregatingState implementation that stores state in RocksDB.backend, columnFamily, keySerializationDataOutputView, keySerializationStream, stateDesc| Constructor and Description |
|---|
RocksDBAggregatingState(org.rocksdb.ColumnFamilyHandle columnFamily,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
org.apache.flink.api.common.state.AggregatingStateDescriptor<T,ACC,R> stateDesc,
RocksDBKeyedStateBackend<K> backend)
Creates a new
RocksDBFoldingState. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T value) |
R |
get() |
void |
mergeNamespaces(N target,
Collection<N> sources) |
clear, getSerializedValue, readKeyWithGroupAndNamespace, setCurrentNamespace, writeCurrentKeyWithGroupAndNamespace, writeKeyWithGroupAndNamespaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic RocksDBAggregatingState(org.rocksdb.ColumnFamilyHandle columnFamily,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
org.apache.flink.api.common.state.AggregatingStateDescriptor<T,ACC,R> stateDesc,
RocksDBKeyedStateBackend<K> backend)
RocksDBFoldingState.namespaceSerializer - The serializer for the namespace.stateDesc - The state identifier for the state. This contains the state name and aggregation function.public R get() throws IOException
get in interface org.apache.flink.api.common.state.AppendingState<T,R>IOExceptionpublic void add(T value) throws IOException
add in interface org.apache.flink.api.common.state.AppendingState<T,R>IOExceptionCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.