Github user mengxr commented on the pull request:
https://github.com/apache/spark/pull/3193#issuecomment-63019228
@davies Did you only measure the `rdd.sample(...).count()`? Sampling 1
million took about 0.6s without replacement and 2.5s with replacement on my
computer. I think we use the same macbook model or yours is better:)
Maybe part of the time in your case was spent on broadcasting the rdd.
Could you try the following:
~~~
from pyspark.mllib.random import RandomRDDs
rdd = RandomRDDs.uniformRDD(sc, 1 << 20, 1).cache()
rdd.count()
rdd.sample(True, 0.9).count()
~~~
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]