-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-10575][Spark Core]Wrapped RDD.takeSample with Scope #8730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Test build #42370 has finished for PR 8730 at commit
|
|
Test build #42378 has finished for PR 8730 at commit
|
|
Test build #42381 has finished for PR 8730 at commit
|
|
One thing people have asked me to do is copy the description from JIRA over to the description in the pull request. |
|
Can we retest?, it is failing in unrelated module |
|
yup, just say "jenkins retest this please" in a comment. |
|
jenkins retest this please |
|
Test build #42399 has finished for PR 8730 at commit
|
|
Test build #42398 has finished for PR 8730 at commit
|
|
LGTM, maybe @andrewor14, the author of the TODO this resolves and who seems to have been the last committer to work on takeSample, can take a look at this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, the only difference here is that if num == 0 we still do a count(), whereas before we just return quickly. I think we should preserve the old behavior even though it adds another layer of nesting and unfortunately makes the code harder to read.
|
Thanks for the ping. I was just looking at this in parallel. I had 1 minor comment but otherwise this looks good. |
|
Test build #42457 has finished for PR 8730 at commit
|
|
Test build #42459 has finished for PR 8730 at commit
|
|
Test build #42466 has finished for PR 8730 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these two lines have a lot of style errors... they should be
if (initialCount == 0) {
new Array[T](0)
} else {
...
}
|
OK I'm merging this after fixing the style myself. @vinodkc thanks for providing the fix. |
Remove return statements in RDD.takeSample and wrap it withScope