ivoson commented on code in PR #37268:
URL: https://github.com/apache/spark/pull/37268#discussion_r934645603
##########
core/src/main/scala/org/apache/spark/resource/ResourceProfile.scala:
##########
@@ -76,6 +76,11 @@ class ResourceProfile(
executorResources.asJava
}
+ /**
+ * Target executor's resource profile id, used for schedule.
+ */
+ def targetExecutorRpId: Int = id
Review Comment:
`id` is an identifier for a `ResourceProfile`, the `targetExecutorRpId`
describes which executors shall `TaskScheduler` assign tasks. Before this PR,
`TaskScheduler` will do exactly id matching between task rp id and executor rp
id, so `id` should be enough.
But if we want to share/reuse executors, `TaskScheduler` will need to
schedule tasks to different/compatible executors, so task's RP Id and
executor's RP Id may be not same in that way. The `targetExecutorRpId` here try
to describe which executors to assign for tasks with `ResourceProfile`, it
could be different with `id`.
Pretty like compatible resource profile id in concept.
--
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]