attilapiros 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_r299290248
##########
File path: core/src/main/scala/org/apache/spark/executor/Executor.scala
##########
@@ -412,6 +432,11 @@ private[spark] class Executor(
env.mapOutputTracker.asInstanceOf[MapOutputTrackerWorker].updateEpoch(task.epoch)
}
+ val stageId = task.stageId
+ val stageAttemptId = task.stageAttemptId
+ metricsPoller.onTaskStart(taskId, stageId, stageAttemptId)
+ taskStarted = true
Review comment:
Sorry my comment was not clear enough. So if I recall correctly what I meant
here is the method `onTaskCompletion()` seamed to me handling this case (when
the task is not started) very well:
https://github.com/apache/spark/blob/f9c284bdc650e2c06d06b5488d637ffad3390d99/core/src/main/scala/org/apache/spark/executor/ExecutorMetricsPoller.scala#L148-L151
So I would save the extra unnecessary boolean flag here where the code is
already quite complex and long. But if you want to make this part robust for
future code changes then you can be more explicit within `onTaskCompletion()`
by adding an `if` wrapping these two lines and checking the content of
`stageTCMP`.
What is your opinion?
----------------------------------------------------------------
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]