You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by srowen <gi...@git.apache.org> on 2016/09/30 12:00:47 UTC
[GitHub] spark pull request #15303: [SPARK-17671] Changed implementation of HistorySe...
Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/15303#discussion_r81325520
--- Diff: core/src/main/scala/org/apache/spark/status/api/v1/ApplicationListResource.scala ---
@@ -42,22 +42,39 @@ private[v1] class ApplicationListResource(uiRoot: UIRoot) {
}
val includeCompleted = adjStatus.contains(ApplicationStatus.COMPLETED)
val includeRunning = adjStatus.contains(ApplicationStatus.RUNNING)
- val appList = allApps.filter { app =>
- val anyRunning = app.attempts.exists(!_.completed)
- // if any attempt is still running, we consider the app to also still be running
- val statusOk = (!anyRunning && includeCompleted) ||
- (anyRunning && includeRunning)
- // keep the app if *any* attempts fall in the right time window
- val dateOk = app.attempts.exists { attempt =>
- attempt.startTime.getTime >= minDate.timestamp &&
- attempt.startTime.getTime <= maxDate.timestamp
+ val numApps = Option(limit).getOrElse(Integer.MAX_VALUE).asInstanceOf[Int]
+
+ new Iterator[ApplicationInfo] {
--- End diff --
Likewise, this is entirely fine as-is, filtering on an iterator
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org