Github user ajbozarth commented on a diff in the pull request:
https://github.com/apache/spark/pull/10154#discussion_r46852090
--- Diff: core/src/main/scala/org/apache/spark/ui/exec/ExecutorsPage.scala
---
@@ -117,6 +119,28 @@ private[ui] class ExecutorsPage(
val maximumMemory = info.maxMemory
val memoryUsed = info.memoryUsed
val diskUsed = info.diskUsed
+
+ // Determine Color Opacity from 0.5-1
+ var activeTasksAlpha = 1.0
+ var failedTasksAlpha = 1.0
+ var completedTasksAlpha = 1.0
+ var totalDurationAlpha = 1.0
+ if (info.totalCores > 0) {
+ // activeTasks range from 0 to all cores
+ activeTasksAlpha = (info.activeTasks.toDouble / info.totalCores) *
0.5 + 0.5
+ }
+ if (info.totalTasks > 0) {
--- End diff --
I wanted to do that but the style guide wasn't clear on whether it was
allow, I'll update it since it's cleaner. And I'll add the 1.0 cap, I left it
off originally because the code was getting busy and hard to read originally.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]