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

    https://github.com/apache/spark/pull/462#discussion_r11806419
  
    --- Diff: core/src/main/scala/org/apache/spark/api/java/JavaPairRDD.scala 
---
    @@ -119,7 +119,13 @@ class JavaPairRDD[K, V](val rdd: RDD[(K, V)])
       /**
        * Return a sampled subset of this RDD.
        */
    -  def sample(withReplacement: Boolean, fraction: Double, seed: Int): 
JavaPairRDD[K, V] =
    +  def sample(withReplacement: Boolean, fraction: Double): JavaPairRDD[K, 
V] =
    +    sample(withReplacement, fraction, System.nanoTime)
    +    
    +  /**
    +   * Return a sampled subset of this RDD.
    +   */
    +  def sample(withReplacement: Boolean, fraction: Double, seed: Long): 
JavaPairRDD[K, V] =
    --- End diff --
    
    I think it's import to use Int instead of Long. Since current code is wrote 
against Int. If we change to Long, the old code using the sample api cannot be 
compiled because of type mismatch.


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