public class Aggregator<K,V,C>
extends Object
implements scala.Product, scala.Serializable
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.
Constructor and Description |
---|
Aggregator(scala.Function1<V,C> createCombiner,
scala.Function2<C,V,C> mergeValue,
scala.Function2<C,C,C> mergeCombiners) |
Modifier and Type | Method and Description |
---|---|
scala.collection.Iterator<scala.Tuple2<K,C>> |
combineCombinersByKey(scala.collection.Iterator<scala.Product2<K,C>> iter) |
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) |
scala.collection.Iterator<scala.Tuple2<K,C>> |
combineValuesByKey(scala.collection.Iterator<scala.Product2<K,V>> iter,
TaskContext context) |
scala.Function1<V,C> |
createCombiner() |
scala.Function2<C,C,C> |
mergeCombiners() |
scala.Function2<C,V,C> |
mergeValue() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public scala.collection.Iterator<scala.Tuple2<K,C>> combineValuesByKey(scala.collection.Iterator<scala.Product2<K,V>> iter)
public scala.collection.Iterator<scala.Tuple2<K,C>> combineValuesByKey(scala.collection.Iterator<scala.Product2<K,V>> iter, TaskContext context)
public scala.collection.Iterator<scala.Tuple2<K,C>> combineCombinersByKey(scala.collection.Iterator<scala.Product2<K,C>> iter)
public scala.collection.Iterator<scala.Tuple2<K,C>> combineCombinersByKey(scala.collection.Iterator<scala.Product2<K,C>> iter, TaskContext context)