Github user squito commented on a diff in the pull request:
https://github.com/apache/spark/pull/5432#discussion_r29232845
--- Diff:
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala ---
@@ -138,31 +142,34 @@ private[history] class FsHistoryProvider(conf:
SparkConf) extends ApplicationHis
override def getListing(): Iterable[FsApplicationHistoryInfo] =
applications.values
- override def getAppUI(appId: String): Option[SparkUI] = {
+ override def getAppUI(appId: String, attemptId: String): Option[SparkUI]
= {
try {
- applications.get(appId).map { info =>
- val replayBus = new ReplayListenerBus()
- val ui = {
- val conf = this.conf.clone()
- val appSecManager = new SecurityManager(conf)
- SparkUI.createHistoryUI(conf, replayBus, appSecManager, appId,
- s"${HistoryServer.UI_PATH_PREFIX}/$appId")
- // Do not call ui.bind() to avoid creating a new server for each
application
- }
+ applications.get(appId).flatMap { appInfo =>
+ val attempts = appInfo.attempts.filter(_.attemptId == attemptId)
--- End diff --
the doc for `getAppUI` says to use an empty string for apps with a single
attempt -- but that isn't exactly what is reflected here. Some yarn apps will
be successful on the first attempt, but with this implementation, you still
need to pass in the actual attempt id. One way or the other, the doc & this
should be resolved.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]