Github user wgtmac commented on a diff in the pull request:
https://github.com/apache/spark/pull/15248#discussion_r80753534
--- Diff:
core/src/main/scala/org/apache/spark/status/api/v1/ApplicationListResource.scala
---
@@ -32,7 +32,14 @@ private[v1] class ApplicationListResource(uiRoot:
UIRoot) {
@DefaultValue("3000-01-01") @QueryParam("maxDate") maxDate:
SimpleDateParam,
@QueryParam("limit") limit: Integer)
: Iterator[ApplicationInfo] = {
- val allApps = uiRoot.getApplicationInfoList
+ val allApps = {
--- End diff --
view is good point.
However, it doesn't apply here because uiRoot.getApplicationInfoList.view
is too late and the transformation of the whole list within
getApplicationInfoList() still happens before the .view method. Changing
getApplicationInfoList to return a view is not a good idea since it breaks its
original intention.
To make it one line, I can change the method signature to
getApplicationInfoList(limit: java.lang.Integer) which is a little bit ugly.
---
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]