K
- The type of the key.N
- The type of the namespace.IN
- The type of the value added to the state.ACC
- The type of the value stored in the state (the accumulator type).OUT
- The type of the value returned from the state.public class HeapAggregatingState<K,N,IN,ACC,OUT> extends AbstractHeapMergingState<K,N,IN,OUT,ACC,org.apache.flink.api.common.state.AggregatingState<IN,OUT>,org.apache.flink.api.common.state.AggregatingStateDescriptor<IN,ACC,OUT>> implements InternalAggregatingState<N,IN,OUT>
ReducingState
that is
snapshotted into files.currentNamespace, keySerializer, namespaceSerializer, stateDesc, stateTable
Constructor and Description |
---|
HeapAggregatingState(org.apache.flink.api.common.state.AggregatingStateDescriptor<IN,ACC,OUT> stateDesc,
StateTable<K,N,ACC> stateTable,
org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer)
Creates a new key/value state for the given hash map of key/value pairs.
|
Modifier and Type | Method and Description |
---|---|
void |
add(IN value) |
OUT |
get() |
protected ACC |
mergeState(ACC a,
ACC b) |
mergeNamespaces
clear, getSerializedValue, getSerializedValue, getStateTable, setCurrentNamespace
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
mergeNamespaces
getSerializedValue, setCurrentNamespace
public HeapAggregatingState(org.apache.flink.api.common.state.AggregatingStateDescriptor<IN,ACC,OUT> stateDesc, StateTable<K,N,ACC> stateTable, org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer)
stateDesc
- The state identifier for the state. This contains name and can create a default state value.stateTable
- The state table to use in this kev/value state. May contain initial state.namespaceSerializer
- The serializer for the type that indicates the namespacepublic OUT get()
public void add(IN value) throws IOException
add
in interface org.apache.flink.api.common.state.AppendingState<IN,OUT>
IOException
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.