Github user d2r commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9051#discussion_r44837028
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala ---
    @@ -145,9 +145,20 @@ private[ui] class StageTableBase(
           case None => "Unknown"
         }
         val finishTime = s.completionTime.getOrElse(System.currentTimeMillis)
    -    val duration = s.submissionTime.map { t =>
    -      if (finishTime > t) finishTime - t else System.currentTimeMillis - t
    -    }
    +    val taskLaunchTimes = stageData.taskData.values
    +        .filter(_.taskInfo.launchTime != 0)
    +        .map(_.taskInfo.launchTime)
    +    val duration : Option[Long] =
    +      if (taskLaunchTimes.nonEmpty) {
    +        val startTime = taskLaunchTimes.min
    +        if (finishTime > startTime) {
    +          Option[Long](finishTime - startTime)
    +        } else {
    +          Option[Long](System.currentTimeMillis() - startTime)
    --- End diff --
    
    @andrewor14 , thanks.  Can you elaborate a bit?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to