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

    https://github.com/apache/spark/pull/21809#discussion_r218570004
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/jobs/StagePage.scala ---
    @@ -105,15 +105,30 @@ private[ui] class StagePage(parent: StagesTab, store: 
AppStatusStore) extends We
         val stageAttemptId = parameterAttempt.toInt
     
         val stageHeader = s"Details for Stage $stageId (Attempt 
$stageAttemptId)"
    -    val stageData = parent.store
    -      .asOption(parent.store.stageAttempt(stageId, stageAttemptId, details 
= false))
    -      .getOrElse {
    -        val content =
    -          <div id="no-info">
    -            <p>No information to display for Stage {stageId} (Attempt 
{stageAttemptId})</p>
    -          </div>
    -        return UIUtils.headerSparkPage(request, stageHeader, content, 
parent)
    -      }
    +    var stageDataTuple: Option[Tuple2[StageData, Seq[Int]]] = try {
    --- End diff --
    
    can't we just simplify this to be close to what is was before but return 
the tuple:
    
    val (stageData, stageJodIds) = parent.store
          .asOption(parent.store.stageAttempt(stageId, stageAttemptId, details 
= false))
          .getOrElse {
            val content =
              <div id="no-info">
                <p>No information to display for Stage {stageId} (Attempt 
{stageAttemptId})</p>
              </div>
            return UIUtils.headerSparkPage(stageHeader, content, parent)
          }


---

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

Reply via email to