case class Aggregator[K, V, C](createCombiner: (V) ⇒ C, mergeValue: (C, V) ⇒ C, mergeCombiners: (C, C) ⇒ C) extends Product with Serializable
A set of functions used to aggregate data.
- createCombiner
function to create the initial value of the aggregation.
- mergeValue
function to merge a new value into the aggregation result.
- mergeCombiners
function to merge outputs from multiple mergeValue function.
- Annotations
- @DeveloperApi()
- Source
- Aggregator.scala
- Alphabetic
- By Inheritance
- Aggregator
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Aggregator(createCombiner: (V) ⇒ C, mergeValue: (C, V) ⇒ C, mergeCombiners: (C, C) ⇒ C)
- createCombiner
function to create the initial value of the aggregation.
- mergeValue
function to merge a new value into the aggregation result.
- mergeCombiners
function to merge outputs from multiple mergeValue function.
Value Members
- def combineCombinersByKey(iter: Iterator[_ <: Product2[K, C]], context: TaskContext): Iterator[(K, C)]
- def combineValuesByKey(iter: Iterator[_ <: Product2[K, V]], context: TaskContext): Iterator[(K, C)]
- val createCombiner: (V) ⇒ C
- val mergeCombiners: (C, C) ⇒ C
- val mergeValue: (C, V) ⇒ C