Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/18887#discussion_r141086913
--- Diff:
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala ---
@@ -243,42 +282,38 @@ private[history] class FsHistoryProvider(conf:
SparkConf, clock: Clock)
override def getAppUI(appId: String, attemptId: Option[String]):
Option[LoadedAppUI] = {
try {
- applications.get(appId).flatMap { appInfo =>
- appInfo.attempts.find(_.attemptId == attemptId).flatMap { attempt
=>
+ val appInfo = load(appId)
+ appInfo.attempts
+ .find { attempt => attempt.info.attemptId == attemptId }
+ .map { attempt =>
val replayBus = new ReplayListenerBus()
val ui = {
val conf = this.conf.clone()
val appSecManager = new SecurityManager(conf)
- SparkUI.createHistoryUI(conf, replayBus, appSecManager,
appInfo.name,
- HistoryServer.getAttemptURI(appId, attempt.attemptId),
- Some(attempt.lastUpdated), attempt.startTime)
+ SparkUI.createHistoryUI(conf, replayBus, appSecManager,
appInfo.info.name,
+ HistoryServer.getAttemptURI(appId, attempt.info.attemptId),
+ Some(attempt.info.lastUpdated.getTime()),
attempt.info.startTime.getTime())
--- End diff --
Shall we make `load` return `ApplicationHistoryInfo` instead of
`ApplicationInfoWrapper`? Then we can reduce a lot of unnecessary diff.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]