Skip to content

Commit

Permalink
rename sg -> b to represent proper type
Browse files Browse the repository at this point in the history
  • Loading branch information
erikerlandson committed Dec 2, 2015
1 parent ba9df9f commit f0dc4f2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class AlgebirdRDD[T](val rdd: RDD[T]) extends AnyVal {
def aggregateOption[B: ClassTag, C](agg: Aggregator[T, B, C]): Option[C] = {
val pr = rdd.mapPartitions({ data =>
if (data.isEmpty) Iterator.empty else {
val sg = agg.prepare(data.next)
Iterator(agg.appendAll(sg, data))
val b = agg.prepare(data.next)
Iterator(agg.appendAll(b, data))
}
}, preservesPartitioning = true)
pr.coalesce(1, shuffle = true)
Expand Down

0 comments on commit f0dc4f2

Please sign in to comment.