diff --git a/core/src/main/scala/org/apache/spark/ui/jobs/StagePage.scala b/core/src/main/scala/org/apache/spark/ui/jobs/StagePage.scala
index b83a49f79c8a8..e96bf49d0dd14 100644
--- a/core/src/main/scala/org/apache/spark/ui/jobs/StagePage.scala
+++ b/core/src/main/scala/org/apache/spark/ui/jobs/StagePage.scala
@@ -572,55 +572,55 @@ private[ui] class StagePage(parent: StagesTab) extends WebUIPage("stage") {
val attempt = taskInfo.attempt
val timelineObject =
s"""
- {
- 'className': 'task task-assignment-timeline-object',
- 'group': '$executorId',
- 'content': '
' +
- 'Status: ${taskInfo.status}
' +
- 'Launch Time: ${UIUtils.formatDate(new Date(launchTime))}' +
- '${
+ |{
+ |'className': 'task task-assignment-timeline-object',
+ |'group': '$executorId',
+ |'content': '
+ |Status: ${taskInfo.status}
+ |Launch Time: ${UIUtils.formatDate(new Date(launchTime))}
+ |${
if (!taskInfo.running) {
s"""
Finish Time: ${UIUtils.formatDate(new Date(finishTime))}"""
} else {
""
}
- }' +
- '
Scheduler Delay: $schedulerDelay ms' +
- '
Task Deserialization Time: ${UIUtils.formatDuration(deserializationTime)}' +
- '
Shuffle Read Time: ${UIUtils.formatDuration(shuffleReadTime)}' +
- '
Executor Computing Time: ${UIUtils.formatDuration(executorComputingTime)}' +
- '
Shuffle Write Time: ${UIUtils.formatDuration(shuffleWriteTime)}' +
- '
Result Serialization Time: ${UIUtils.formatDuration(serializationTime)}' +
- '
Getting Result Time: ${UIUtils.formatDuration(gettingResultTime)}">' +
- '',
- 'start': new Date($launchTime),
- 'end': new Date($finishTime)
- }
- """
+ }
+ |
Scheduler Delay: $schedulerDelay ms
+ |
Task Deserialization Time: ${UIUtils.formatDuration(deserializationTime)}
+ |
Shuffle Read Time: ${UIUtils.formatDuration(shuffleReadTime)}
+ |
Executor Computing Time: ${UIUtils.formatDuration(executorComputingTime)}
+ |
Shuffle Write Time: ${UIUtils.formatDuration(shuffleWriteTime)}
+ |
Result Serialization Time: ${UIUtils.formatDuration(serializationTime)}
+ |
Getting Result Time: ${UIUtils.formatDuration(gettingResultTime)}">
+ |',
+ |'start': new Date($launchTime),
+ |'end': new Date($finishTime)
+ |}
+ |""".stripMargin.replaceAll("\n", " ")
timelineObject
}.mkString("[", ",", "]")