Github user gengliangwang commented on a diff in the pull request: https://github.com/apache/spark/pull/21809#discussion_r205752305 --- 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 -- this code branch is unreachable.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org