[SPARK-29872] Improper cache strategy in examples#26498
Closed
Icysandwich wants to merge 1 commit intoapache:masterfrom
Closed
[SPARK-29872] Improper cache strategy in examples#26498Icysandwich wants to merge 1 commit intoapache:masterfrom
Icysandwich wants to merge 1 commit intoapache:masterfrom
Conversation
|
Can one of the admins verify this patch? |
srowen
requested changes
Nov 13, 2019
|
|
||
| // Set the model threshold to maximize F-Measure | ||
| val fMeasure = trainingSummary.fMeasureByThreshold | ||
| val fMeasure = trainingSummary.fMeasureByThreshold.cache() |
Member
There was a problem hiding this comment.
I'm not sure this one is important for an example. It won't matter much
|
|
||
| // Because join() joins on keys, the edges are stored in reversed order. | ||
| val edges = tc.map(x => (x._2, x._1)) | ||
| val edges = tc.map(x => (x._2, x._1)).cache() |
Member
There was a problem hiding this comment.
This is more complex for an example, but, I think it's reasonably important to show this pattern in this type of example.
| .textFile("examples/src/main/resources/people.txt") | ||
| .map(_.split(",")) | ||
| .map(attributes => Person(attributes(0), attributes(1).trim.toInt)) | ||
| .cache() |
Member
There was a problem hiding this comment.
This one isn't important enough to bother with, I think. The data is small
Member
|
BTW "improper" isn't quite the right word. These aren't bugs per se. |
Contributor
Author
|
Okay, I see. |
Member
|
I think the SparkTC change was OK, but yeah the examples just don't matter much. Maybe it's best to not clutter the example. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Correct some cache strategy in examples.
Why are the changes needed?
These changes can improve the performance of examples.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Manually