sarutak commented on a change in pull request #28061: [SPARK-31270][CORE]
Expose executor metrics in task detail table in StageLevel
URL: https://github.com/apache/spark/pull/28061#discussion_r403767340
##########
File path: core/src/main/scala/org/apache/spark/status/LiveEntity.scala
##########
@@ -129,13 +129,19 @@ private class LiveTask(
// checked when calculating indexed values when writing to the store (see
[[TaskDataWrapper]]).
private var metrics: v1.TaskMetrics = createMetrics(default = -1L)
+ val executorMetrics = new ExecutorMetrics()
+
var errorMessage: Option[String] = None
/**
* Update the metrics for the task and return the difference between the
previous and new
* values.
*/
- def updateMetrics(metrics: TaskMetrics): v1.TaskMetrics = {
+ def updateMetrics(metrics: TaskMetrics,
+ executorMetrics: Option[ExecutorMetrics] = None):
v1.TaskMetrics = {
+ executorMetrics.foreach {
+ this.executorMetrics.compareAndUpdatePeakValues
+ }
Review comment:
How about
`executorMetrics.foreach(this.executorMetrics.compareAndUpdatePeakValues)`?
----------------------------------------------------------------
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]