Github user squito commented on a diff in the pull request: https://github.com/apache/spark/pull/22612#discussion_r236863378 --- Diff: core/src/main/scala/org/apache/spark/executor/ExecutorMetrics.scala --- @@ -28,16 +28,14 @@ import org.apache.spark.metrics.ExecutorMetricType @DeveloperApi class ExecutorMetrics private[spark] extends Serializable { - // Metrics are indexed by ExecutorMetricType.values - private val metrics = new Array[Long](ExecutorMetricType.values.length) - + private val metrics = new Array[Long](ExecutorMetricType.numMetrics) --- End diff -- I'd keep a comment here explaining this array, just update that its now indexed by `ExecutorMetricType.metricToOffset`
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org