Github user twinkle-sachdeva commented on a diff in the pull request:
https://github.com/apache/spark/pull/4845#discussion_r25951518
--- Diff:
core/src/main/scala/org/apache/spark/deploy/history/HistoryPage.scala ---
@@ -34,18 +37,31 @@ private[spark] class HistoryPage(parent: HistoryServer)
extends WebUIPage("") {
val requestedIncomplete =
Option(request.getParameter("showIncomplete")).getOrElse("false").toBoolean
- val allApps = parent.getApplicationList().filter(_.completed !=
requestedIncomplete)
- val actualFirst = if (requestedFirst < allApps.size) requestedFirst
else 0
- val apps = allApps.slice(actualFirst, Math.min(actualFirst + pageSize,
allApps.size))
-
+ val allCompletedAppsNAttempts =
+ parent.getApplicationList().filter(_.completed !=
requestedIncomplete)
+ val (hasAttemptInfo, appToAttemptMap) =
getApplicationLevelList(allCompletedAppsNAttempts)
--- End diff --
Hi @vanzin ,
If we change to this data structure, then logic at getAppUI and
getApplicationLevelList at FsHistoryProvider will get a bit more complicated.
Also, If there is any extension written for ApplicationHistoryInfo, that
will also get impacted.
As per my understanding, what we are trying to achieve is get the list
itself as a mapping from application id => List of Attempts.
I will prefer a utility method to get such mapped list, rather than
modifying the structure.
Following is the basis for the same ( regarding complication of
FsHistoryProvider only ):
1. As we get the event logs of attempts one by one, logic to either create
the new FsApplicationHistoryInfo or add to existing FsApplicationHistoryInfo
object's attempt info list, needs to be incorporated.
2. Order within the attempt info for an application, will require it's
separate attention.
3. Transition from In-Progress attempt to Complete will require another
level of indirection.
4. Inside getUI method also, we will require two level of indirections.
Please consider these points, as compared to the utility method to get the
same while creating HistoryPage.
---
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]