Github user mateiz commented on a diff in the pull request:
https://github.com/apache/spark/pull/1460#discussion_r15264487
--- Diff: python/pyspark/tests.py ---
@@ -47,6 +48,64 @@
SPARK_HOME = os.environ["SPARK_HOME"]
+class TestMerger(unittest.TestCase):
+
+ def setUp(self):
+ self.N = 1 << 16
+ self.l = [i for i in xrange(self.N)]
+ self.data = zip(self.l, self.l)
+ self.agg = Aggregator(lambda x: [x],
+ lambda x, y: x.append(y) or x,
+ lambda x, y: x.extend(y) or x)
+ ExternalMerger.PARTITIONS = 8
+ ExternalMerger.BATCH = 1 << 14
--- End diff --
These are never cleared, so they might affect future tests. It's better to
make them arguments to the constructor of ExternalMerger.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---