K - The type of the key.N - The type of the namespace.V - The type of the value.public class HeapReducingState<K,N,V> extends AbstractHeapMergingState<K,N,V,V,V,ReducingState<V>,ReducingStateDescriptor<V>> implements InternalReducingState<N,V>
ReducingState that is
snapshotted into files.currentNamespace, keySerializer, namespaceSerializer, stateDesc, stateTable| Constructor and Description |
|---|
HeapReducingState(ReducingStateDescriptor<V> stateDesc,
StateTable<K,N,V> 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(V value) |
V |
get() |
protected V |
mergeState(V a,
V b) |
mergeNamespacesclear, getSerializedValue, getSerializedValue, getStateTable, setCurrentNamespaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmergeNamespacesgetSerializedValue, setCurrentNamespacepublic HeapReducingState(ReducingStateDescriptor<V> stateDesc, StateTable<K,N,V> 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.public V get()
get in interface AppendingState<V,V>public void add(V value) throws IOException
add in interface AppendingState<V,V>IOExceptionprotected V mergeState(V a, V b) throws Exception
mergeState in class AbstractHeapMergingState<K,N,V,V,V,ReducingState<V>,ReducingStateDescriptor<V>>ExceptionCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.