ivoson opened a new pull request, #39410:
URL: https://github.com/apache/spark/pull/39410

   ### What changes were proposed in this pull request?
   As described in 
[SPARK-41848](https://issues.apache.org/jira/browse/SPARK-41848), we update the 
[executor's free 
cores](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala#L424)
 based on executor's resource profile. For tasks with TaskResourceProfile in 
standalone cluster, since executors with default resource profile can be reused 
across different TaskResourceProfiles, and the task cpus can be different from 
the value we get from executor's resource profile.
   
   The changes to fix the issues:
   1. Decrease executor free cores when launch tasks by taskCpus from 
`TaskDescription`;
   2. Adding taskCpus to `StatusUpdate` as well as the other resources, so that 
taskCpus can be reported when task is finished and we can increase executor 
free cores by the reported taskCpus;
   
   ### Why are the changes needed?
   Fixing the bug as described in 
[SPARK-41848](https://issues.apache.org/jira/browse/SPARK-41848)
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   New UTs added.
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to