Skip to content

Commit

Permalink
Clean context of most remaining functions in PairRDDFunctions, which …
Browse files Browse the repository at this point in the history
…ultimately call combineByKey
  • Loading branch information
srowen committed Dec 14, 2014
1 parent ef84dab commit 8df68fe
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)])
throw new SparkException("Default partitioner cannot partition array keys.")
}
}
val aggregator = new Aggregator[K, V, C](createCombiner, mergeValue, mergeCombiners)
val aggregator = new Aggregator[K, V, C](
self.context.clean(createCombiner),
self.context.clean(mergeValue),
self.context.clean(mergeCombiners))
if (self.partitioner == Some(partitioner)) {
self.mapPartitions(iter => {
val context = TaskContext.get()
Expand Down

0 comments on commit 8df68fe

Please sign in to comment.