[SPARK-34005][CORE][3.1] Update peak memory metrics for each Executor on task end #31261
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR backports SPARK-34005 (#31029).
This PR makes
AppStatusListenerupdate the peak memory metrics for each Executor on task end like other peak memory metrics (e.g, stage, executors in a stage).Why are the changes needed?
When
AppStatusListener#onExecutorMetricsUpdateis called, peak memory metrics for Executors, stages and executors in a stage are updated but currently, the metrics only for Executors are not updated on task end.Does this PR introduce any user-facing change?
Yes. Executor peak memory metrics is updated more accurately.
How was this patch tested?
After I run a job with
local-cluster[1,1,1024]and visited/api/v1/<appid>/executors, I confirmedpeakExecutorMemorymetrics is shown for an Executor even though the life time of each job is very short .I also modify the json files for
HistoryServerSuite.