sarutak commented on code in PR #55655:
URL: https://github.com/apache/spark/pull/55655#discussion_r3201919677
##########
sql/core/src/main/resources/org/apache/spark/sql/execution/ui/static/allexecutionspage.js:
##########
@@ -195,7 +195,13 @@ $(document).ready(function () {
data: "duration", name: "duration", title: "Duration",
render: function (data, type) {
if (type !== "display") return data;
- return formatDurationSql(data);
+ var formatted = formatDurationSql(data);
+ if (data > 600000) {
Review Comment:
The hard-coded 1min / 10min values concern me. Absolute thresholds are
workload-sensitive. For interactive queries 1min is already unusual, while for
ETL batch queries 10min is normal, so the UI would end up mostly red.
At minimum, these should be configurable via Spark conf (e.g.
`spark.sql.ui.longRunningWarnThresholdMs` / `...DangerThresholdMs`), with an
escape hatch (e.g. `-1`) to disable highlighting entirely. Without that, users
with batch workloads have no way to opt out of a UI that shows no useful
information for them.
Beyond that, we could also consider relative thresholds (e.g. Pn of the
current page), which would match the design of `totalDurationStyle` in
`executorspage.js`. That one uses a GC ratio rather than absolute duration,
precisely because absolute values don't generalize well.
What do you think, @yaooqinn?
##########
sql/core/src/main/resources/org/apache/spark/sql/execution/ui/static/allexecutionspage.js:
##########
@@ -195,7 +195,13 @@ $(document).ready(function () {
data: "duration", name: "duration", title: "Duration",
render: function (data, type) {
if (type !== "display") return data;
- return formatDurationSql(data);
+ var formatted = formatDurationSql(data);
+ if (data > 600000) {
+ return '<span class="text-danger">' + formatted + '</span>';
Review Comment:
To @yaooqinn
This PR colors the text itself, but another option would be to color the
cell background (like the Executor Page does). Which approach did you intend?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]