Skip to content

[SPARK-31271][UI] fix web ui for driver side SQL metrics#28037

Closed
cloud-fan wants to merge 1 commit intoapache:masterfrom
cloud-fan:ui
Closed

[SPARK-31271][UI] fix web ui for driver side SQL metrics#28037
cloud-fan wants to merge 1 commit intoapache:masterfrom
cloud-fan:ui

Conversation

@cloud-fan
Copy link
Contributor

What changes were proposed in this pull request?

In #23551, we changed the metrics type of driver-side SQL metrics to size/time etc. which comes with max/min/median info.

This doesn't make sense for driver side SQL metrics as they have only one value. It makes the web UI hard to read:
image

This PR updates the SQL metrics UI to only display max/min/median if there are more than one metrics values:
image

Why are the changes needed?

Makes the UI easier to read

Does this PR introduce any user-facing change?

no

How was this patch tested?

manual test

@cloud-fan
Copy link
Contributor Author

cc @gengliangwang @sarutak

@SparkQA
Copy link

SparkQA commented Mar 26, 2020

Test build #120424 has finished for PR 28037 at commit 9e84f21.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@sarutak
Copy link
Member

sarutak commented Mar 26, 2020

@cloud-fan
Basically LGTM.
But as you suggested, the metrics format for stageId and attemptId can be changed so should we wait for #28039 to be merged.

Copy link
Member

@dongjoon-hyun dongjoon-hyun Mar 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you fix the following in SQLMetricsTestUtils.scala? That causes UT failures.

    val totalNumBytesMetric = executedNode.metrics.find(
      _.name == "written output total (min, med, max (stageId (attemptId): taskId))").get

@SparkQA
Copy link

SparkQA commented Mar 27, 2020

Test build #120477 has finished for PR 28037 at commit f91c51c.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Mar 27, 2020

Test build #120476 has finished for PR 28037 at commit acbaa45.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Mar 27, 2020

Test build #120488 has finished for PR 28037 at commit 5838142.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

metric
s"total $METRICS_NAME_SUFFIX\n$sum ($min, $med, $max $taskInfo)"
}
s"\n$sum ($min, $med, $max)"
Copy link
Member

@dongjoon-hyun dongjoon-hyun Mar 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question: In this case, it seems that we didn't have $taskInfo previously.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. I also verified this locally via web UI. Thank you, all.
Merged to master/3.0.

dongjoon-hyun pushed a commit that referenced this pull request Mar 27, 2020
### What changes were proposed in this pull request?

In #23551, we changed the metrics type of driver-side SQL metrics to size/time etc. which comes with max/min/median info.

This doesn't make sense for driver side SQL metrics as they have only one value. It makes the web UI hard to read:
![image](https://user-images.githubusercontent.com/3182036/77653892-42db9900-6fab-11ea-8e7f-92f763fa32ff.png)

This PR updates the SQL metrics UI to only display max/min/median if there are more than one metrics values:
![image](https://user-images.githubusercontent.com/3182036/77653975-5f77d100-6fab-11ea-849e-64c935377c8e.png)

### Why are the changes needed?

Makes the UI easier to read

### Does this PR introduce any user-facing change?

no

### How was this patch tested?
manual test

Closes #28037 from cloud-fan/ui.

Authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit c4e98c0)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
sjincho pushed a commit to sjincho/spark that referenced this pull request Apr 15, 2020
### What changes were proposed in this pull request?

In apache#23551, we changed the metrics type of driver-side SQL metrics to size/time etc. which comes with max/min/median info.

This doesn't make sense for driver side SQL metrics as they have only one value. It makes the web UI hard to read:
![image](https://user-images.githubusercontent.com/3182036/77653892-42db9900-6fab-11ea-8e7f-92f763fa32ff.png)

This PR updates the SQL metrics UI to only display max/min/median if there are more than one metrics values:
![image](https://user-images.githubusercontent.com/3182036/77653975-5f77d100-6fab-11ea-849e-64c935377c8e.png)

### Why are the changes needed?

Makes the UI easier to read

### Does this PR introduce any user-facing change?

no

### How was this patch tested?
manual test

Closes apache#28037 from cloud-fan/ui.

Authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments