Use Algebird Aggregator to do the reduction
Use Algebird Aggregator to do the reduction
Selects all elements except first n ones.
Selects all elements except first n ones.
Drops longest prefix of elements that satisfy the given predicate.
Drops longest prefix of elements that satisfy the given predicate.
WARNING This behaves semantically very differently than cogroup.
WARNING This behaves semantically very differently than cogroup. this is because we handle (K,T) tuples on the left as we see them. the iterator on the right is over all elements with a matching key K, and it may be empty if there are no values for this key K. (because you haven't actually cogrouped, but only read the right hand side into a hashtable)
Operate on a Stream[T] of all the values for each key at one time.
This is a special case of mapValueStream, but can be optimized because it doesn't need all the values for a given key at once.
reduce with fn which must be associative and commutative.
reduce with fn which must be associative and commutative. Like the above this can be optimized in some Grouped cases. If you don't have a commutative operator, use reduceLeft
If there is no ordering, we default to assuming the Semigroup is commutative.
Semigroups MAY have a faster implementation of sum for iterators, so prefer using sum/sumLeft to reduce
Semigroups MAY have a faster implementation of sum for iterators, so prefer using sum/sumLeft to reduce
Selects first n elements.
Selects first n elements.
Takes longest prefix of elements that satisfy the given predicate.
Takes longest prefix of elements that satisfy the given predicate.
Represents a grouping which is the transition from map to reduce phase in hadoop. Grouping is on a key of type K by ordering Ordering[K].