-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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
[SPARK-12902] [SQL] visualization for generated operators #10828
Closed
Closed
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f0f3da6
visualize the plans inside whole stage codegen
331b46d
remove metrics, because they are very slow
a179e8d
fix style
ccac152
Update spark-dag-viz.js
f28da22
Merge branch 'master' of github.com:apache/spark into viz_codegen
5a43126
fix conflict
f5c9087
Merge branch 'viz_codegen' of github.com:davies/spark into viz_codegen
163a014
Merge branch 'master' of github.com:apache/spark into viz_codegen
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,7 +84,7 @@ class SQLMetricsSuite extends SparkFunSuite with SharedSQLContext { | |
// If we can track all jobs, check the metric values | ||
val metricValues = sqlContext.listener.getExecutionMetrics(executionId) | ||
val actualMetrics = SparkPlanGraph(SparkPlanInfo.fromSparkPlan( | ||
df.queryExecution.executedPlan)).nodes.filter { node => | ||
df.queryExecution.executedPlan)).allNodes.filter { node => | ||
expectedMetrics.contains(node.id) | ||
}.map { node => | ||
val nodeMetrics = node.metrics.map { metric => | ||
|
@@ -132,6 +132,14 @@ class SQLMetricsSuite extends SparkFunSuite with SharedSQLContext { | |
) | ||
} | ||
|
||
test("WholeStageCodegen metrics") { | ||
// Assume the execution plan is | ||
// WholeStageCodegen(nodeId = 0, Range(nodeId = 2) -> Filter(nodeId = 1)) | ||
// TODO: update metrics in generated operators | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a JIRA for this one? If not, could you create one? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
val df = sqlContext.range(10).filter('id < 5) | ||
testSparkPlanMetrics(df, 1, Map.empty) | ||
} | ||
|
||
test("TungstenAggregate metrics") { | ||
// Assume the execution plan is | ||
// ... -> TungstenAggregate(nodeId = 2) -> Exchange(nodeId = 1) | ||
|
This file contains 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
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.
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.
Why use a different style? I think we should make the UI stuff consistent.
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.
Which one will you suggest? This is outer of operator, should be lighter than that, I choose this because it's between white and the one used for operators.
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.
I meant using the following style:
This looks more consistent with the stage page:
![screen shot 2016-01-20 at 10 24 32 am](https://cloud.githubusercontent.com/assets/1000778/12458733/27bb575a-bf60-11e5-9db3-e02759730255.png)
By the way, I saw a bug in the stage page:
![screen shot 2016-01-20 at 10 24 14 am](https://cloud.githubusercontent.com/assets/1000778/12458746/3597a2a2-bf60-11e5-9378-86914ef9a473.png)
Could you check it?