Skip to content

Commit 2f54a33

Browse files
committed
Removed Completed Tasks coloring
1 parent 05f957a commit 2f54a33

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

core/src/main/scala/org/apache/spark/ui/exec/ExecutorsPage.scala

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ private[ui] class ExecutorsPage(
120120
val maximumMemory = info.maxMemory
121121
val memoryUsed = info.memoryUsed
122122
val diskUsed = info.diskUsed
123-
124123
<tr>
125124
<td>{info.id}</td>
126125
<td>{info.hostPort}</td>
@@ -132,7 +131,7 @@ private[ui] class ExecutorsPage(
132131
<td sorttable_customkey={diskUsed.toString}>
133132
{Utils.bytesToString(diskUsed)}
134133
</td>
135-
{coloredData(info.maxTasks, info.activeTasks, info.failedTasks, info.completedTasks,
134+
{taskData(info.maxTasks, info.activeTasks, info.failedTasks, info.completedTasks,
136135
info.totalTasks, info.totalDuration, info.totalGCTime)}
137136
<td sorttable_customkey={info.totalInputBytes.toString}>
138137
{Utils.bytesToString(info.totalInputBytes)}
@@ -189,7 +188,7 @@ private[ui] class ExecutorsPage(
189188
<td sorttable_customkey={diskUsed.toString}>
190189
{Utils.bytesToString(diskUsed)}
191190
</td>
192-
{coloredData(execInfo.map(_.maxTasks).sum,
191+
{taskData(execInfo.map(_.maxTasks).sum,
193192
execInfo.map(_.activeTasks).sum,
194193
execInfo.map(_.failedTasks).sum,
195194
execInfo.map(_.completedTasks).sum,
@@ -231,7 +230,7 @@ private[ui] class ExecutorsPage(
231230
</table>
232231
}
233232

234-
private def coloredData(maxTasks: Int,
233+
private def taskData(maxTasks: Int,
235234
activeTasks: Int,
236235
failedTasks: Int,
237236
completedTasks: Int,
@@ -240,21 +239,19 @@ private[ui] class ExecutorsPage(
240239
totalGCTime: Long):
241240
Seq[Node] = {
242241
// Determine Color Opacity from 0.5-1
243-
// activeTasks range from 0 to all cores
242+
// activeTasks range from 0 to maxTasks
244243
val activeTasksAlpha =
245244
if (maxTasks > 0) {
246245
(activeTasks.toDouble / maxTasks) * 0.5 + 0.5
247246
} else {
248247
1
249248
}
250249
// failedTasks range max at 10% failure, alpha max = 1
251-
// completedTasks range ignores 90% of tasks
252-
val (failedTasksAlpha, completedTasksAlpha) =
250+
val failedTasksAlpha =
253251
if (totalTasks > 0) {
254-
(math.min (10 * failedTasks.toDouble / totalTasks, 1) * 0.5 + 0.5,
255-
math.max (((10 * completedTasks.toDouble / totalTasks) - 9) * 0.5 + 0.5, 0.5) )
252+
math.min (10 * failedTasks.toDouble / totalTasks, 1) * 0.5 + 0.5
256253
} else {
257-
(1, 1)
254+
1
258255
}
259256
// totalDuration range from 0 to 50% GC time, alpha max = 1
260257
val totalDurationAlpha =
@@ -279,13 +276,7 @@ private[ui] class ExecutorsPage(
279276
""
280277
}
281278
}>{failedTasks}</td>
282-
<td style={
283-
if (completedTasks > 0) {
284-
"background:hsla(120, 100%, 25%, " + completedTasksAlpha + ");color:white"
285-
} else {
286-
""
287-
}
288-
}>{completedTasks}</td>
279+
<td>{completedTasks}</td>
289280
<td>{totalTasks}</td>
290281
<td sorttable_customkey={totalDuration.toString} style={
291282
// Red if GC time over GCTimePercent of total time

0 commit comments

Comments
 (0)