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

    https://github.com/apache/spark/pull/21809#discussion_r205782862
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/jobs/StagePage.scala ---
    @@ -105,16 +105,29 @@ private[ui] class StagePage(parent: StagesTab, store: 
AppStatusStore) extends We
         val stageAttemptId = parameterAttempt.toInt
     
         val stageHeader = s"Details for Stage $stageId (Attempt 
$stageAttemptId)"
    -    val stageDataWrapper = parent.store.stageAttempt(stageId, 
stageAttemptId, details = false)
    -    val stageData = parent.store
    -      .asOption(stageDataWrapper.info)
    -      .getOrElse {
    +    var stageDataWrapper: StageDataWrapper = null
    +    try {
    +      stageDataWrapper = parent.store.stageAttempt(stageId, 
stageAttemptId, details = false)
    +    } catch {
    +      case e: NoSuchElementException => e.getMessage
    +    }
    +    var stageData: StageData = null
    +    if (stageDataWrapper != null) {
    +      stageData = parent.store
    +        .asOption(stageDataWrapper.info)
    +        .get
    +    } else {
    +      stageData = {
    --- End diff --
    
    It is unreachable by the IDE but during runtime, the code does work, I have 
confirmed that.


---

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

Reply via email to