Skip to content
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-46384][SPARK-46404][SS][UI] Fix Operation Duration Stack Chart on Structured Streaming Page #44346

Closed
wants to merge 5 commits into from

Conversation

yaooqinn
Copy link
Member

@yaooqinn yaooqinn commented Dec 14, 2023

What changes were proposed in this pull request?

In this PR, we feed correct data to d3.stack() according to the API Change. https://d3js.org/d3-shape/stack

Why are the changes needed?

Fix Operation Duration Stack Chart

Does this PR introduce any user-facing change?

no

How was this patch tested?

UI UT tests Add

ui-test/tests/structured-streaming-page.test.js

Local tests

image

Was this patch authored or co-authored using generative AI tooling?

no

Comment on lines -140 to -144
.on("mousemove", (event, d) => {
var xPosition = d3.pointer(event)[0] - 15;
var yPosition = d3.pointer(event)[1] - 25;
tooltip.attr("transform", "translate(" + xPosition + "," + yPosition + ")");
tooltip.select("text").text(d.y);
Copy link
Member Author

@yaooqinn yaooqinn Dec 14, 2023

Choose a reason for hiding this comment

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

Removed this because the color set doesn't define d.y.

// pre-define some colors for legends.
var colorPool = ["#F8C471", "#F39C12", "#B9770E", "#73C6B6", "#16A085", "#117A65", "#B2BABB", "#7F8C8D", "#616A6B"];

/* eslint-disable no-unused-vars */
function drawAreaStack(id, labels, values, minX, maxX, minY, maxY) {
Copy link
Member Author

Choose a reason for hiding this comment

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

minX, maxX, minY, maxY removed as we never touch them

@@ -145,6 +143,8 @@ private[spark] class JsCollector {
*/
private val statements = ArrayBuffer[String]()

private val imports = mutable.Set[String]()
Copy link
Member Author

Choose a reason for hiding this comment

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

make it a set to avoid duplicated imports

@yaooqinn yaooqinn changed the title [WIP] [SPARK-46384][SS][UI] Fix Operation Duration Stack Chart on Structured Streaming Page [SPARK-46384][SS][UI] Fix Operation Duration Stack Chart on Structured Streaming Page Dec 14, 2023
@yaooqinn
Copy link
Member Author

@yaooqinn yaooqinn changed the title [SPARK-46384][SS][UI] Fix Operation Duration Stack Chart on Structured Streaming Page [SPARK-46384][SPARK-46404][SS][UI] Fix Operation Duration Stack Chart on Structured Streaming Page Dec 14, 2023
Copy link
Contributor

@LuciferYang LuciferYang 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

Left some unimportant comments

@yaooqinn yaooqinn closed this in 7d30bd7 Dec 15, 2023
@yaooqinn
Copy link
Member Author

Thanks all. Merged to master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants