squito commented on a change in pull request #23767: [SPARK-26329][CORE] Faster
polling of executor memory metrics.
URL: https://github.com/apache/spark/pull/23767#discussion_r268736877
##########
File path: core/src/main/scala/org/apache/spark/executor/ExecutorMetrics.scala
##########
@@ -46,14 +49,21 @@ class ExecutorMetrics private[spark] extends Serializable {
Array.copy(metrics, 0, this.metrics, 0, Math.min(metrics.size,
this.metrics.size))
}
+ private[spark] def this(metrics: AtomicLongArray) {
+ this()
+ ExecutorMetricType.metricToOffset.foreach { case (_, i) =>
+ this.metrics(i) = metrics.get(i)
+ }
+ }
+
/**
* Constructor: create the ExecutorMetrics with using a given map.
Review comment:
not related to your change, but can you fix the typo here?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]