Github user keypointt commented on the pull request:
https://github.com/apache/spark/pull/11108#issuecomment-199567084
Oh yes I just tried 2.10 and 2.11, where 2.11 build succeeded but 2.10
failed.
Should I just explicitly add val seed?
// specify the exact fraction desired from each key
val fractions = Map(1 -> 0.1, 2 -> 0.6, 3 -> 0.3)
val seed = Utils.random.nextLong
// Get an approximate sample from each stratum
val approxSample = data.sampleByKey(withReplacement = false, fractions,
seed)
// Get an exact sample from each stratum
val exactSample = data.sampleByKeyExact(withReplacement = false,
fractions, seed)
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]