vanzin commented on a change in pull request #25964: [SPARK-29287][Core] Add
ExecutorConstructed message to tell driver which executor is ready for making
offers
URL: https://github.com/apache/spark/pull/25964#discussion_r344413982
##########
File path:
core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala
##########
@@ -186,6 +186,11 @@ class CoarseGrainedSchedulerBackend(scheduler:
TaskSchedulerImpl, val rpcEnv: Rp
// automatically, so try to tell the executor to stop itself. See
SPARK-13519.
executorDataMap.get(executorId).foreach(_.executorEndpoint.send(StopExecutor))
removeExecutor(executorId, reason)
+
+ case ExecutorConstructed(executorId) =>
+ executorDataMap.get(executorId).foreach { data =>
+ data.freeCores = data.totalCores
+ }
Review comment:
Don't you need to call `makeOffers(executorId)` to have the executor get
tasks right away, instead of waiting for other events to trigger that?
Simiarly, the old "register" message handler does not need to call
`makeOffers` anymore.
----------------------------------------------------------------
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]