Github user smartnut007 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/462#discussion_r11816224
  
    --- Diff: core/src/test/scala/org/apache/spark/rdd/RDDSuite.scala ---
    @@ -466,6 +466,12 @@ class RDDSuite extends FunSuite with 
SharedSparkContext {
       test("takeSample") {
         val data = sc.parallelize(1 to 100, 2)
     
    +           for (num <- List(5,20,100)) {
    +             val sample = data.takeSample(withReplacement=false, num=num)
    --- End diff --
    
    @advancedxy java.util.Random the default seed is a function of 
System.nanoTime ( at least in the openjdk code ). In python its based on 
time.time().  python time.time() is at the millisecond precision. Not sure if 
there is a python method to get nanoTime. 


---
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.
---

Reply via email to