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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to