Skip to content

Commit f2793c0

Browse files
shahidki31venkata91
authored andcommitted
[SPARK-26109][WEBUI] Duration in the task summary metrics table and the task table are different
Ref: LIHADOOP-54112 Task summary table displays the summary of the task table in the stage page. However, the 'Duration' metrics of 'task summary' table and 'task table' are not matching. The reason is because, in the 'task summary' we display 'executorRunTime' as the duration, and in the 'task table' the actual duration of the task. Except duration metrics, all other metrics are properly displaying in the task summary. In Spark2.2, used to show 'executorRunTime' as duration in the 'taskTable'. That is why, in summary metrics also the 'exeuctorRunTime' shows as the duration. So, we need to show 'executorRunTime' as the duration in the tasks table to follow the same behaviour as the previous versions of spark. Before patch: ![screenshot from 2018-11-19 04-32-06](https://user-images.githubusercontent.com/23054875/48679263-1e4fff80-ebb4-11e8-9ed5-16d892039e01.png) After patch: ![screenshot from 2018-11-19 04-37-39](https://user-images.githubusercontent.com/23054875/48679343-e39a9700-ebb4-11e8-8df9-9dc3a28d4bce.png) Closes apache#23081 from shahidki31/duratinSummary. Authored-by: Shahid <shahidki31@gmail.com> Signed-off-by: Sean Owen <sean.owen@databricks.com> (cherry picked from commit 540afc2) Signed-off-by: Sean Owen <sean.owen@databricks.com> RB=2150408 BUG=LIHADOOP-54112 G=spark-reviewers R=yezhou,rhu,ydegani,keshi A=rhu,ydegani
1 parent 8d5ab5d commit f2793c0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ private[ui] class TaskPagedTable(
940940
</div>
941941
</td>
942942
<td>{UIUtils.formatDate(task.launchTime)}</td>
943-
<td>{formatDuration(task.duration)}</td>
943+
<td>{formatDuration(task.taskMetrics.map(_.executorRunTime))}</td>
944944
<td class={TaskDetailsClassNames.SCHEDULER_DELAY}>
945945
{UIUtils.formatDuration(AppStatusUtils.schedulerDelay(task))}
946946
</td>
@@ -1093,7 +1093,9 @@ private[ui] object ApiHelper {
10931093
HEADER_EXECUTOR -> TaskIndexNames.EXECUTOR,
10941094
HEADER_HOST -> TaskIndexNames.HOST,
10951095
HEADER_LAUNCH_TIME -> TaskIndexNames.LAUNCH_TIME,
1096-
HEADER_DURATION -> TaskIndexNames.DURATION,
1096+
// SPARK-26109: Duration of task as executorRunTime to make it consistent with the
1097+
// aggregated tasks summary metrics table and the previous versions of Spark.
1098+
HEADER_DURATION -> TaskIndexNames.EXEC_RUN_TIME,
10971099
HEADER_SCHEDULER_DELAY -> TaskIndexNames.SCHEDULER_DELAY,
10981100
HEADER_DESER_TIME -> TaskIndexNames.DESER_TIME,
10991101
HEADER_GC_TIME -> TaskIndexNames.GC_TIME,

0 commit comments

Comments
 (0)