-
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-46384][SPARK-46404][SS][UI] Fix Operation Duration Stack Chart on Structured Streaming Page #44346
Conversation
.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); |
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.
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) { |
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.
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]() |
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.
make it a set to avoid duplicated imports
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.
+1, LGTM
Left some unimportant comments
core/src/main/resources/org/apache/spark/ui/static/structured-streaming-page.js
Show resolved
Hide resolved
Thanks all. Merged to master |
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
Was this patch authored or co-authored using generative AI tooling?
no