Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class AlgebirdRDD[T](val rdd: RDD[T]) extends AnyVal {
Iterator(agg.appendAll(b, data))
}
}, preservesPartitioning = true)
pr.coalesce(1, shuffle = true)
pr.repartition(1)
.mapPartitions(pr => Iterator(agg.semigroup.sumOption(pr)))
.collect.head.map(agg.present)
}
Expand Down Expand Up @@ -112,7 +112,7 @@ class AlgebirdRDD[T](val rdd: RDD[T]) extends AnyVal {

// my reading of the docs is that we do want a shuffle at this stage to
// to make sure the upstream work is done in parallel.
val results = partialReduce.coalesce(1, shuffle = true).mapPartitions({ it =>
val results = partialReduce.repartition(1).mapPartitions({ it =>
Iterator(sg.sumOption(it))
}, preservesPartitioning = true)
.collect
Expand Down