Github user paragpc commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11867#discussion_r96997288
  
    --- Diff: 
core/src/main/scala/org/apache/spark/status/api/v1/ApplicationListResource.scala
 ---
    @@ -43,11 +45,24 @@ private[v1] class ApplicationListResource(uiRoot: 
UIRoot) {
           // keep the app if *any* attempts fall in the right time window
           ((!anyRunning && includeCompleted) || (anyRunning && 
includeRunning)) &&
           app.attempts.exists { attempt =>
    -        val start = attempt.startTime.getTime
    -        start >= minDate.timestamp && start <= maxDate.timestamp
    +        isAttemptInRange(attempt, minDate, maxDate, minEndDate, 
maxEndDate, anyRunning)
           }
         }.take(numApps)
       }
    +
    +  private def isAttemptInRange(
    +      attempt: ApplicationAttemptInfo,
    +      minStartDate: SimpleDateParam,
    +      maxStartDate: SimpleDateParam,
    +      minEndDate: SimpleDateParam,
    +      maxEndDate: SimpleDateParam,
    +      skipEndTimeValidation: Boolean): Boolean = {
    +    val startTimeOk = attempt.startTime.getTime >= minStartDate.timestamp 
&&
    +      attempt.startTime.getTime <= maxStartDate.timestamp
    +    val endTimeOk = skipEndTimeValidation || (attempt.endTime.getTime >= 
minEndDate.timestamp &&
    --- End diff --
    
    @squito, thanks for pointing that out. I think we can change the endTimeOk 
condition to include this case. I updated the pull request.


---
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