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(org.apache.flink.api.common.functions.ReduceFunction<T> reducer, org.apache.flink.util.Collector<T> outputCollector, boolean objectReuseEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidemit()Emits all elements currently held by the table to the collector.voidemitAndReset()Emits all elements currently held by the table to the collector, and resets the table.voidupdateTableEntryWithReduce(T record)Looks up the table entry that has the same key as the given record, and updates it by performing a reduce step.
-
-
-
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 IOExceptionEmits all elements currently held by the table to the collector.- Throws:
IOException
-
emitAndReset
public void emitAndReset() throws IOExceptionEmits 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
-
-