Github user mengxr commented on a diff in the pull request: https://github.com/apache/spark/pull/2928#discussion_r19362102 --- Diff: core/src/main/scala/org/apache/spark/rdd/SampledRDD.scala --- @@ -53,9 +53,14 @@ private[spark] class SampledRDD[T: ClassTag]( if (withReplacement) { // For large datasets, the expected number of occurrences of each element in a sample with // replacement is Poisson(frac). We use that to get a count for each element. - val poisson = new Poisson(frac, new DRand(split.seed)) + val poisson = new PoissonDistribution( + new MersenneTwister(split.seed), --- End diff -- The default RNG is Well19937c. From the doc, it is better but slower than MT. I'm leaning towards the default because sampling computation is usually not the bottleneck for Spark.
--- 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. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org