diff options
Diffstat (limited to 'core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala')
-rw-r--r-- | core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala b/core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala index c5fd3ae16d..99828487f1 100644 --- a/core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala +++ b/core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala @@ -106,7 +106,9 @@ private[spark] class StageTable(val stages: Seq[StageInfo], val parent: JobProgr val description = listener.stageIdToDescription.get(s.stageId) .map(d => <div><em>{d}</em></div><div>{nameLink}</div>).getOrElse(nameLink) val finishTime = s.completionTime.getOrElse(System.currentTimeMillis()) - val duration = s.submissionTime.map(t => finishTime - t) + val duration = s.submissionTime.map { t => + if (finishTime > t) finishTime - t else System.currentTimeMillis - t + } <tr> <td>{s.stageId}</td> |