Github user mengxr commented on a diff in the pull request: https://github.com/apache/spark/pull/919#discussion_r13371699 --- Diff: core/src/test/java/org/apache/spark/JavaAPISuite.java --- @@ -145,6 +135,27 @@ public void intersection() { } @Test + public void sample() { + List<Integer> ints = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); + JavaRDD<Integer> rdd = sc.parallelize(ints); + JavaRDD<Integer> sample20 = rdd.sample(true, 0.2, 11); + Assert.assertEquals(3, sample20.count()); // expected 2 but of course result varies randomly a bit --- End diff -- This line is too wide.
--- 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. ---