spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayousterhout <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-7296][WebUI] Timeline view for Stage pa...
Date Thu, 14 May 2015 18:38:59 GMT
Github user kayousterhout commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5843#discussion_r30349178
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/jobs/StagePage.scala ---
    @@ -460,25 +492,195 @@ private[ui] class StagePage(parent: StagesTab) extends WebUIPage("stage")
{
             dagViz ++
             maybeExpandDagViz ++
             showAdditionalMetrics ++
    +        makeTimeline(stageData.taskData.values.toSeq, currentTime) ++
             <h4>Summary Metrics for {numCompleted} Completed Tasks</h4> ++
             <div>{summaryTable.getOrElse("No tasks have reported metrics yet.")}</div>
++
             <h4>Aggregated Metrics by Executor</h4> ++ executorTable.toNodeSeq
++
             maybeAccumulableTable ++
             <h4>Tasks</h4> ++ taskTable
    -
           UIUtils.headerSparkPage(stageHeader, content, parent, showVisualization = true)
         }
       }
     
    +  def makeTimeline(tasks: Seq[TaskUIData], currentTime: Long): Seq[Node] = {
    +    val executorsSet = new HashSet[(String, String)]
    +    var minLaunchTime = Long.MaxValue
    +    var maxFinishTime = Long.MinValue
    +    var numEffectiveTasks = 0
    +
    +    val executorsArrayStr =
    +      tasks.sortBy(-_.taskInfo.launchTime).take(MAX_TIMELINE_TASKS).map { taskUIData
=>
    +        val taskInfo = taskUIData.taskInfo
    +        val executorId = taskInfo.executorId
    +        val host = taskInfo.host
    +        executorsSet += ((executorId, host))
    +
    +        val isSucceeded = taskInfo.successful
    +        val isFailed = taskInfo.failed
    +        val isRunning = taskInfo.running
    +        val classNameByStatus = {
    +          if (isSucceeded) {
    --- End diff --
    
    Can you just inline these (so put "if (taskInfo.successful)" here), since isSucceeded/isFailed/isRunning
aren't used again elsewhere?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message