Repository: spark Updated Branches: refs/heads/master a18ea00f3 -> d55ec86de
bugfix: Wrong "Duration" in "Active Stages" in stages page If a stage which has completed once loss parts of data, it will be resubmitted. At this time, it appears that stage.completionTime > stage.submissionTime. Author: shiyun.wxm <shiyun....@taobao.com> Closes #170 from BlackNiuza/duration_problem and squashes the following commits: a86d261 [shiyun.wxm] tow space indent c0d7b24 [shiyun.wxm] change the style 3b072e1 [shiyun.wxm] fix scala style f20701e [shiyun.wxm] bugfix: "Duration" in "Active Stages" in stages page Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/d55ec86d Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/d55ec86d Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/d55ec86d Branch: refs/heads/master Commit: d55ec86de2e96f7dc9d1dd107daa35c3823791ec Parents: a18ea00 Author: shiyun.wxm <shiyun....@taobao.com> Authored: Wed Mar 19 01:42:34 2014 -0700 Committer: Reynold Xin <r...@apache.org> Committed: Wed Mar 19 01:42:34 2014 -0700 ---------------------------------------------------------------------- core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/d55ec86d/core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala ---------------------------------------------------------------------- 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 c5fd3ae..9982848 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>