Skip to content
Snippets Groups Projects
Commit d55ec86d authored by shiyun.wxm's avatar shiyun.wxm Committed by Reynold Xin
Browse files

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.wxm@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
parent a18ea00f
No related branches found
No related tags found
No related merge requests found
...@@ -106,7 +106,9 @@ private[spark] class StageTable(val stages: Seq[StageInfo], val parent: JobProgr ...@@ -106,7 +106,9 @@ private[spark] class StageTable(val stages: Seq[StageInfo], val parent: JobProgr
val description = listener.stageIdToDescription.get(s.stageId) val description = listener.stageIdToDescription.get(s.stageId)
.map(d => <div><em>{d}</em></div><div>{nameLink}</div>).getOrElse(nameLink) .map(d => <div><em>{d}</em></div><div>{nameLink}</div>).getOrElse(nameLink)
val finishTime = s.completionTime.getOrElse(System.currentTimeMillis()) 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> <tr>
<td>{s.stageId}</td> <td>{s.stageId}</td>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment