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,AggregatingState<IN,OUT>,AggregatingStateDescriptor<IN,ACC,OUT>> implements InternalAggregatingState<N,IN,OUT>
ReducingState that is
snapshotted into files.currentNamespace, keySerializer, namespaceSerializer, stateDesc, stateTable| Constructor and Description |
|---|
HeapAggregatingState(AggregatingStateDescriptor<IN,ACC,OUT> stateDesc,
StateTable<K,N,ACC> stateTable,
TypeSerializer<K> keySerializer,
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) |
mergeNamespacesclear, getSerializedValue, getSerializedValue, getStateTable, setCurrentNamespaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmergeNamespacesgetSerializedValue, setCurrentNamespacepublic HeapAggregatingState(AggregatingStateDescriptor<IN,ACC,OUT> stateDesc, StateTable<K,N,ACC> stateTable, TypeSerializer<K> keySerializer, 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()
get in interface AppendingState<IN,OUT>public void add(IN value) throws IOException
add in interface AppendingState<IN,OUT>IOExceptionprotected ACC mergeState(ACC a, ACC b) throws Exception
mergeState in class AbstractHeapMergingState<K,N,IN,OUT,ACC,AggregatingState<IN,OUT>,AggregatingStateDescriptor<IN,ACC,OUT>>ExceptionCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.