K - The type of the key.N - The type of the namespace.IN - The type of the input elements.SV - The type of the values in the state.OUT - The type of the output elements.S - The type of Statepublic abstract class AbstractHeapMergingState<K,N,IN,SV,OUT,S extends org.apache.flink.api.common.state.State> extends AbstractHeapState<K,N,SV,S> implements InternalMergingState<K,N,IN,SV,OUT>
MergingState (InternalMergingState) that is stored on the heap.currentNamespace, keySerializer, namespaceSerializer, stateTable, valueSerializer| Modifier | Constructor and Description |
|---|---|
protected |
AbstractHeapMergingState(StateTable<K,N,SV> stateTable,
org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<SV> valueSerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
SV defaultValue)
Creates a new key/value state for the given hash map of key/value pairs.
|
| Modifier and Type | Method and Description |
|---|---|
void |
mergeNamespaces(N target,
Collection<N> sources)
Merges the state of the current key for the given source namespaces into the state of
the target namespace.
|
protected abstract SV |
mergeState(SV a,
SV b) |
clear, getDefaultValue, getSerializedValue, getStateTable, setCurrentNamespaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetKeySerializer, getNamespaceSerializer, getSerializedValue, getValueSerializer, setCurrentNamespaceprotected AbstractHeapMergingState(StateTable<K,N,SV> stateTable, org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<SV> valueSerializer, org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, SV defaultValue)
stateTable - The state table for which this state is associated to.keySerializer - The serializer for the keys.valueSerializer - The serializer for the state.namespaceSerializer - The serializer for the namespace.defaultValue - The default value for the state.public void mergeNamespaces(N target, Collection<N> sources) throws Exception
InternalMergingStatemergeNamespaces in interface InternalMergingState<K,N,IN,SV,OUT>target - The target namespace where the merged state should be stored.sources - The source namespaces whose state should be merged.Exception - The method may forward exception thrown internally (by I/O or functions).Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.