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

    https://github.com/apache/spark/pull/22612#discussion_r231921807
  
    --- Diff: 
core/src/main/scala/org/apache/spark/executor/ExecutorMetrics.scala ---
    @@ -69,11 +67,10 @@ class ExecutorMetrics private[spark] extends 
Serializable {
        */
       private[spark] def compareAndUpdatePeakValues(executorMetrics: 
ExecutorMetrics): Boolean = {
         var updated = false
    -
    -    (0 until ExecutorMetricType.values.length).foreach { idx =>
    -       if (executorMetrics.metrics(idx) > metrics(idx)) {
    +    ExecutorMetricType.definedMetricsAndOffset.map {m =>
    --- End diff --
    
    space after `{`.  also a bit clearer if you use pattern matching `.map { 
case (_, idx) =>`


---

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

Reply via email to