Class 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 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