Github user mateiz commented on a diff in the pull request: https://github.com/apache/spark/pull/1460#discussion_r15072948 --- Diff: python/pyspark/rdd.py --- @@ -1247,15 +1366,12 @@ def combineLocally(iterator): return combiners.iteritems() locally_combined = self.mapPartitions(combineLocally) shuffled = locally_combined.partitionBy(numPartitions) - + + executorMemory = self.ctx._jsc.sc().executorMemory() def _mergeCombiners(iterator): - combiners = {} - for (k, v) in iterator: - if k not in combiners: - combiners[k] = v - else: - combiners[k] = mergeCombiners(combiners[k], v) - return combiners.iteritems() + merger = Merger(mergeCombiners, executorMemory * 0.7) --- End diff -- We probably want to use the same memory as the Java append only map, which is spark.shuffle.memoryFraction * executorMemory. Check how that gets created in ExternalAppendOnlyMap
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---