Class InPlaceMutableHashTable.ReduceFacade
- java.lang.Object
-
- org.apache.flink.runtime.operators.hash.InPlaceMutableHashTable.ReduceFacade
-
- Enclosing class:
- InPlaceMutableHashTable<T>
public final class InPlaceMutableHashTable.ReduceFacade extends Object
A facade for doing such operations on the hash table that are needed for a reduce operator driver.
-
-
Constructor Summary
Constructors Constructor Description ReduceFacade(ReduceFunction<T> reducer, Collector<T> outputCollector, boolean objectReuseEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
emit()
Emits all elements currently held by the table to the collector.void
emitAndReset()
Emits all elements currently held by the table to the collector, and resets the table.void
updateTableEntryWithReduce(T record)
Looks up the table entry that has the same key as the given record, and updates it by performing a reduce step.
-
-
-
Constructor Detail
-
ReduceFacade
public ReduceFacade(ReduceFunction<T> reducer, Collector<T> outputCollector, boolean objectReuseEnabled)
-
-
Method Detail
-
updateTableEntryWithReduce
public void updateTableEntryWithReduce(T record) throws Exception
Looks up the table entry that has the same key as the given record, and updates it by performing a reduce step.- Parameters:
record
- The record to update.- Throws:
Exception
-
emit
public void emit() throws IOException
Emits all elements currently held by the table to the collector.- Throws:
IOException
-
emitAndReset
public void emitAndReset() throws IOException
Emits all elements currently held by the table to the collector, and resets the table. The table will have the same number of buckets as before the reset, to avoid doing resizes again.- Throws:
IOException
-
-