Github user mateiz commented on a diff in the pull request:
https://github.com/apache/spark/pull/477#discussion_r11866824
--- Diff: python/pyspark/rdd.py ---
@@ -381,13 +382,11 @@ def takeSample(self, withReplacement, num, seed):
# If the first sample didn't turn out large enough, keep trying to
take samples;
# this shouldn't happen often because we use a big multiplier for
their initial size.
# See: scala/spark/RDD.scala
+ random.seed(seed)
--- End diff --
Is this the global random object? Library code should not be setting the
seed and then calling randint. Is there no equivalent of java.util.Random that
you can create and use here?
---
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.
---