Skip to content

Commit 531575d

Browse files
committed
Removed executor launch time
1 parent 1f13afe commit 531575d

File tree

7 files changed

+1
-59
lines changed

7 files changed

+1
-59
lines changed

core/src/main/scala/org/apache/spark/executor/Executor.scala

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,10 @@ private[spark] class Executor(
110110
// Maintains the list of running tasks.
111111
private val runningTasks = new ConcurrentHashMap[Long, TaskRunner]
112112

113-
// Time when the task arrived on the executor. Used to track the overhead of getting a thread for
114-
// the task to run in.
115-
private val taskStartTimes = new ConcurrentHashMap[Long, Long]
116-
117113
startDriverHeartbeater()
118114

119115
def launchTask(
120116
context: ExecutorBackend, taskId: Long, taskName: String, serializedTask: ByteBuffer) {
121-
taskStartTimes.put(taskId, System.currentTimeMillis)
122117
val tr = new TaskRunner(context, taskId, taskName, serializedTask)
123118
runningTasks.put(taskId, tr)
124119
threadPool.execute(tr)
@@ -202,7 +197,6 @@ private[spark] class Executor(
202197
val afterSerialization = System.currentTimeMillis()
203198

204199
for (m <- task.metrics) {
205-
m.executorLaunchTime = deserializeStartTime - taskStartTimes.get(taskId)
206200
m.executorDeserializeTime = taskStart - deserializeStartTime
207201
m.executorRunTime = taskFinish - taskStart
208202
m.jvmGCTime = gcTime - startGCTime
@@ -273,7 +267,6 @@ private[spark] class Executor(
273267
// Release memory used by this thread for unrolling blocks
274268
env.blockManager.memoryStore.releaseUnrollMemoryForThisThread()
275269
runningTasks.remove(taskId)
276-
taskStartTimes.remove(taskId)
277270
}
278271
}
279272
}

core/src/main/scala/org/apache/spark/executor/TaskMetrics.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ class TaskMetrics extends Serializable {
4141
*/
4242
var hostname: String = _
4343

44-
/**
45-
* Time taken on the executor to launch the task in its own thread.
46-
*/
47-
var executorLaunchTime: Long = _
48-
4944
/**
5045
* Time taken on the executor to deserialize this task
5146
*/

core/src/main/scala/org/apache/spark/ui/ToolTips.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ private[spark] object ToolTips {
2424
scheduler delay is large, consider decreasing the size of tasks or decreasing the size
2525
of task results."""
2626

27-
val EXECUTOR_LAUNCH_TIME =
28-
"""Overhead associated with launching the task in its own thread on the executor."""
29-
3027
val TASK_DESERIALIZATION_TIME =
3128
"""Time spent deserializating the task closure on the executor."""
3229

core/src/main/scala/org/apache/spark/ui/jobs/StagePage.scala

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,6 @@ private[ui] class StagePage(parent: JobProgressTab) extends WebUIPage("stage") {
119119
<span class="additional-metric-title">GC Time</span>
120120
</span>
121121
</li>
122-
<li>
123-
<span data-toggle="tooltip"
124-
title={ToolTips.EXECUTOR_LAUNCH_TIME} data-placement="right">
125-
<input type="checkbox" name={TaskDetailsClassNames.EXECUTOR_LAUNCH_TIME}/>
126-
<span class="additional-metric-title">Executor Launch Time</span>
127-
</span>
128-
</li>
129122
<li>
130123
<span data-toggle="tooltip"
131124
title={ToolTips.TASK_DESERIALIZATION_TIME} data-placement="right">
@@ -162,7 +155,6 @@ private[ui] class StagePage(parent: JobProgressTab) extends WebUIPage("stage") {
162155
("Executor ID / Host", ""), ("Launch Time", ""), ("Duration", ""),
163156
("Scheduler Delay", TaskDetailsClassNames.SCHEDULER_DELAY),
164157
("GC Time", TaskDetailsClassNames.GC_TIME),
165-
("Executor Launch Time", TaskDetailsClassNames.EXECUTOR_LAUNCH_TIME),
166158
("Task Deserialization Time", TaskDetailsClassNames.TASK_DESERIALIZATION_TIME),
167159
("Result Serialization Time", TaskDetailsClassNames.RESULT_SERIALIZATION_TIME),
168160
("Getting Result Time", TaskDetailsClassNames.GETTING_RESULT_TIME)) ++
@@ -195,19 +187,6 @@ private[ui] class StagePage(parent: JobProgressTab) extends WebUIPage("stage") {
195187
}
196188
}
197189

198-
val executorLaunchTimes = validTasks.map { case TaskUIData(_, metrics, _) =>
199-
metrics.get.executorLaunchTime.toDouble
200-
}
201-
val executorLaunchTitle =
202-
<td>
203-
<span data-toggle="tooltip" title={ToolTips.EXECUTOR_LAUNCH_TIME}
204-
data-placement="right">
205-
Executor Launch Time
206-
</span>
207-
</td>
208-
val executorLaunchQuantiles =
209-
executorLaunchTitle +: getFormattedTimeQuantiles(executorLaunchTimes)
210-
211190
val deserializationTimes = validTasks.map { case TaskUIData(_, metrics, _) =>
212191
metrics.get.executorDeserializeTime.toDouble
213192
}
@@ -306,7 +285,6 @@ private[ui] class StagePage(parent: JobProgressTab) extends WebUIPage("stage") {
306285
val listings: Seq[Seq[Node]] = Seq(
307286
<tr>{serviceQuantiles}</tr>,
308287
<tr class={TaskDetailsClassNames.SCHEDULER_DELAY}>{schedulerDelayQuantiles}</tr>,
309-
<tr class={TaskDetailsClassNames.EXECUTOR_LAUNCH_TIME}>{executorLaunchQuantiles}</tr>
310288
<tr class={TaskDetailsClassNames.TASK_DESERIALIZATION_TIME}>
311289
{deserializationQuantiles}
312290
</tr>
@@ -358,7 +336,6 @@ private[ui] class StagePage(parent: JobProgressTab) extends WebUIPage("stage") {
358336
else metrics.map(m => UIUtils.formatDuration(m.executorRunTime)).getOrElse("")
359337
val schedulerDelay = getSchedulerDelay(info, metrics.get)
360338
val gcTime = metrics.map(_.jvmGCTime).getOrElse(0L)
361-
val executorLaunchTime = metrics.map(_.executorLaunchTime).getOrElse(0L)
362339
val taskDeserializationTime = metrics.map(_.executorDeserializeTime).getOrElse(0L)
363340
val serializationTime = metrics.map(_.resultSerializationTime).getOrElse(0L)
364341
val gettingResultTime = info.gettingResultTime
@@ -416,10 +393,6 @@ private[ui] class StagePage(parent: JobProgressTab) extends WebUIPage("stage") {
416393
<td sorttable_customkey={gcTime.toString} class={TaskDetailsClassNames.GC_TIME}>
417394
{if (gcTime > 0) UIUtils.formatDuration(gcTime) else ""}
418395
</td>
419-
<td sorttable_customkey={executorLaunchTime.toString}
420-
class={TaskDetailsClassNames.EXECUTOR_LAUNCH_TIME}>
421-
{UIUtils.formatDuration(executorLaunchTime.toLong)}
422-
</td>
423396
<td sorttable_customkey={taskDeserializationTime.toString}
424397
class={TaskDetailsClassNames.TASK_DESERIALIZATION_TIME}>
425398
{UIUtils.formatDuration(taskDeserializationTime.toLong)}
@@ -478,8 +451,7 @@ private[ui] class StagePage(parent: JobProgressTab) extends WebUIPage("stage") {
478451
(info.finishTime - info.launchTime)
479452
}
480453
}
481-
val executorOverhead = (metrics.executorLaunchTime +
482-
metrics.executorDeserializeTime +
454+
val executorOverhead = (metrics.executorDeserializeTime +
483455
metrics.resultSerializationTime)
484456
totalExecutionTime - metrics.executorRunTime - executorOverhead
485457
}

core/src/main/scala/org/apache/spark/ui/jobs/TaskDetailsClassNames.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ package org.apache.spark.ui.jobs
2424
private object TaskDetailsClassNames {
2525
val SCHEDULER_DELAY = "scheduler_delay"
2626
val GC_TIME = "gc_time"
27-
val EXECUTOR_LAUNCH_TIME = "launch_time"
2827
val TASK_DESERIALIZATION_TIME = "deserialization_time"
2928
val RESULT_SERIALIZATION_TIME = "serialization_time"
3029
val GETTING_RESULT_TIME = "getting_result_time"

core/src/main/scala/org/apache/spark/util/JsonProtocol.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ private[spark] object JsonProtocol {
240240
})
241241
}.getOrElse(JNothing)
242242
("Host Name" -> taskMetrics.hostname) ~
243-
("Executor Launch Time" -> taskMetrics.executorLaunchTime) ~
244243
("Executor Deserialize Time" -> taskMetrics.executorDeserializeTime) ~
245244
("Executor Run Time" -> taskMetrics.executorRunTime) ~
246245
("Result Size" -> taskMetrics.resultSize) ~
@@ -563,7 +562,6 @@ private[spark] object JsonProtocol {
563562
}
564563
val metrics = new TaskMetrics
565564
metrics.hostname = (json \ "Host Name").extract[String]
566-
metrics.executorLaunchTime = (json \ "Executor Launch Time").extractOpt[Long].getOrElse(0)
567565
metrics.executorDeserializeTime = (json \ "Executor Deserialize Time").extract[Long]
568566
metrics.executorRunTime = (json \ "Executor Run Time").extract[Long]
569567
metrics.resultSize = (json \ "Result Size").extract[Long]

core/src/test/scala/org/apache/spark/util/JsonProtocolSuite.scala

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,6 @@ class JsonProtocolSuite extends FunSuite {
154154
assert(newMetrics.inputMetrics.isEmpty)
155155
}
156156

157-
test("TaskMetrics.executorLaunchTime backward compatibility") {
158-
// executorLaunchTime was added after 1.1.
159-
val metrics = makeTaskMetrics(1L, 2L, 3L, 4L, 5, 6, hasHadoopInput = true)
160-
val newJson = JsonProtocol.taskMetricsToJson(metrics)
161-
val oldJson = newJson.removeField { case (field, _) => field == "Executor Launch Time" }
162-
val newMetrics = JsonProtocol.taskMetricsFromJson(oldJson)
163-
assert(newMetrics.executorLaunchTime === 0L)
164-
}
165-
166157
test("BlockManager events backward compatibility") {
167158
// SparkListenerBlockManagerAdded/Removed in Spark 1.0.0 do not have a "time" property.
168159
val blockManagerAdded = SparkListenerBlockManagerAdded(1L,
@@ -563,7 +554,6 @@ class JsonProtocolSuite extends FunSuite {
563554
val t = new TaskMetrics
564555
val sw = new ShuffleWriteMetrics
565556
t.hostname = "localhost"
566-
t.executorLaunchTime = c + d
567557
t.executorDeserializeTime = a
568558
t.executorRunTime = b
569559
t.resultSize = c
@@ -806,7 +796,6 @@ class JsonProtocolSuite extends FunSuite {
806796
| },
807797
| "Task Metrics": {
808798
| "Host Name": "localhost",
809-
| "Executor Launch Time": 1100,
810799
| "Executor Deserialize Time": 300,
811800
| "Executor Run Time": 400,
812801
| "Result Size": 500,
@@ -890,7 +879,6 @@ class JsonProtocolSuite extends FunSuite {
890879
| },
891880
| "Task Metrics": {
892881
| "Host Name": "localhost",
893-
| "Executor Launch Time": 1100,
894882
| "Executor Deserialize Time": 300,
895883
| "Executor Run Time": 400,
896884
| "Result Size": 500,

0 commit comments

Comments
 (0)