Class Aggregator<K,V,C>

Object
org.apache.spark.Aggregator<K,V,C>
All Implemented Interfaces:
Serializable, scala.Equals, scala.Product

public class Aggregator<K,V,C> extends Object implements scala.Product, Serializable
:: DeveloperApi :: A set of functions used to aggregate data.

param: createCombiner function to create the initial value of the aggregation. param: mergeValue function to merge a new value into the aggregation result. param: mergeCombiners function to merge outputs from multiple mergeValue function.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Aggregator(scala.Function1<V,C> createCombiner, scala.Function2<C,V,C> mergeValue, scala.Function2<C,C,C> mergeCombiners)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    scala.collection.Iterator<scala.Tuple2<K,C>>
    combineCombinersByKey(scala.collection.Iterator<scala.Product2<K,C>> iter, TaskContext context)
     
    scala.collection.Iterator<scala.Tuple2<K,C>>
    combineValuesByKey(scala.collection.Iterator<scala.Product2<K,V>> iter, TaskContext context)
     
    scala.Function1<V,C>
     
    scala.Function2<C,C,C>
     
    scala.Function2<C,V,C>
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface scala.Equals

    canEqual, equals

    Methods inherited from interface scala.Product

    productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
  • Constructor Details

    • Aggregator

      public Aggregator(scala.Function1<V,C> createCombiner, scala.Function2<C,V,C> mergeValue, scala.Function2<C,C,C> mergeCombiners)
  • Method Details

    • createCombiner

      public scala.Function1<V,C> createCombiner()
    • mergeValue

      public scala.Function2<C,V,C> mergeValue()
    • mergeCombiners

      public scala.Function2<C,C,C> mergeCombiners()
    • combineValuesByKey

      public scala.collection.Iterator<scala.Tuple2<K,C>> combineValuesByKey(scala.collection.Iterator<scala.Product2<K,V>> iter, TaskContext context)
    • combineCombinersByKey

      public scala.collection.Iterator<scala.Tuple2<K,C>> combineCombinersByKey(scala.collection.Iterator<scala.Product2<K,C>> iter, TaskContext context)