Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/462#discussion_r11808152
--- 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 --
`Long` is going to be more standard; certainly Java uses `long` seeds in
its APIs. It gives more bits of seed, which is good too. There may be some API
changes but anyone calling with an `Int` seed should be able to call an API
with a `Long` seed right?
---
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.
---