Github user advancedxy commented on a diff in the pull request:
https://github.com/apache/spark/pull/462#discussion_r11835682
--- 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 --
@smartnut007 based on https://docs.python.org/2/library/time.html#time.time
, time.time() is at the second precision. But since it returns float, I think
we can use long(time.time() * 10**9) to get the nanoTime precision.
---
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.
---