ivoson commented on code in PR #36716:
URL: https://github.com/apache/spark/pull/36716#discussion_r885722489
##########
core/src/main/scala/org/apache/spark/deploy/ExecutorDescription.scala:
##########
@@ -25,10 +25,13 @@ package org.apache.spark.deploy
private[deploy] class ExecutorDescription(
val appId: String,
val execId: Int,
+ val rpId: Int,
val cores: Int,
+ val memoryMb: Int,
Review Comment:
We will need the memoryMb here when [master
failover.](https://github.com/apache/spark/blob/v3.3.0-rc3/core/src/main/scala/org/apache/spark/deploy/master/Master.scala#L351)
Master will reconstruct the app's executor information and worker's resource
usage information.
```
for (exec <- validExecutors) {
val (execDesc, execResources) = (exec.desc, exec.resources)
val app = idToApp(execDesc.appId)
val execInfo = app.addExecutor(
worker, execDesc.cores, execResources, Some(execDesc.execId))
worker.addExecutor(execInfo)
worker.recoverResources(execResources)
execInfo.copyState(execDesc)
}
```
We need to know the memoryMb of the executor while creating
[`ExecutorDesc`](https://github.com/apache/spark/blob/v3.3.0-rc3/core/src/main/scala/org/apache/spark/deploy/master/ApplicationInfo.scala#L88).
And previously, we can get the memoryMb information from
`ApplicaionDescription` which could be recovered from state-store for recovery.
But currently, we may have multiple resource profiles, and we don't have the
resource profiles information written in the state-store, so we need worker to
record the memory information.
And in master, we can only reconstruct the resource profile information in
`ApplicationInfo` after client send resource request `RequestExecutors`
--
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]