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

    https://github.com/apache/spark/pull/22381#discussion_r216429755
  
    --- Diff: 
core/src/main/scala/org/apache/spark/status/AppStatusListener.scala ---
    @@ -382,11 +392,37 @@ private[spark] class AppStatusListener(
           }
     
           job.status = event.jobResult match {
    -        case JobSucceeded => JobExecutionStatus.SUCCEEDED
    -        case JobFailed(_) => JobExecutionStatus.FAILED
    +        case JobSucceeded =>
    +          appStatusSource.foreach{_.SUCCEEDED_JOBS.inc(1)}
    +          JobExecutionStatus.SUCCEEDED
    +        case JobFailed(_) =>
    +          appStatusSource.foreach{_.FAILED_JOBS.inc(1)}
    +          JobExecutionStatus.FAILED
           }
     
           job.completionTime = if (event.time > 0) Some(new Date(event.time)) 
else None
    +
    +      for {
    +        submissionTime <- job.submissionTime
    +        completionTime <- job.completionTime
    +      } yield {
    --- End diff --
    
    Yeah I wanted to do this properly (java 8 wise, didnt think much of it) so 
on one hand I do have the timestamp on the other hand I do have the date 
object. So it was straightforward to pick the date. I didnt extract a timestamp 
out of the date object.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to