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

    Modifier and Type
    Method
    Description
    void
    Emits all elements currently held by the table to the collector.
    void
    Emits all elements currently held by the table to the collector, and resets the table.
    void
    Looks up the table entry that has the same key as the given record, and updates it by performing a reduce step.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ReduceFacade

      public ReduceFacade(org.apache.flink.api.common.functions.ReduceFunction<T> reducer, org.apache.flink.util.Collector<T> outputCollector, boolean objectReuseEnabled)
  • Method Details

    • 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