Skip to content

Commit

Permalink
fix narrow dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Davies Liu committed Apr 7, 2015
1 parent 2a1857a commit e3b8eab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/pyspark/rdd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1802,7 +1802,7 @@ def combine(iterator):
merger.mergeValues(iterator)
return merger.iteritems()

locally_combined = self.mapPartitions(combine)
locally_combined = self.mapPartitions(combine, preservesPartitioning=True)
shuffled = locally_combined.partitionBy(numPartitions)

def groupByKey(it):
Expand Down
2 changes: 1 addition & 1 deletion python/pyspark/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,9 +795,9 @@ def test_narrow_dependency_in_join(self):
self.assertEqual(rdd.getNumPartitions() + 2, parted.union(rdd).getNumPartitions())
self.assertEqual(rdd.getNumPartitions() + 2, rdd.union(parted).getNumPartitions())

self.sc.setJobGroup("test1", "test", True)
tracker = self.sc.statusTracker()

self.sc.setJobGroup("test1", "test", True)
d = sorted(parted.join(parted).collect())
self.assertEqual(10, len(d))
self.assertEqual((0, (0, 0)), d[0])
Expand Down

0 comments on commit e3b8eab

Please sign in to comment.