cxzl25 commented on PR #47977:
URL: https://github.com/apache/spark/pull/47977#issuecomment-2328000643

   > How is unregister shuffle getting called ?
   
   The Executor is added in the case of dynamic allocation. It first 
initializes the BlockManager and registers it with the Driver, and then 
initializes the ShuffleManager.
   
   
https://github.com/apache/spark/blob/339d1c9d9d50bce63316ac788626bea998e71b06/core/src/main/scala/org/apache/spark/executor/Executor.scala#L162
   
   
https://github.com/apache/spark/blob/339d1c9d9d50bce63316ac788626bea998e71b06/core/src/main/scala/org/apache/spark/executor/Executor.scala#L355
   
   
   The Driver will send removeShuffle RPC to all registered BlockManagers. At 
this time, there are some newly added Executors that have not yet initialized 
the ShuffleManager.
   
   
https://github.com/apache/spark/blob/339d1c9d9d50bce63316ac788626bea998e71b06/core/src/main/scala/org/apache/spark/storage/BlockManagerMasterEndpoint.scala#L469-L474
   
   `RemoveShuffle` RPC has two code paths that will trigger.
   
   
https://github.com/apache/spark/blob/339d1c9d9d50bce63316ac788626bea998e71b06/core/src/main/scala/org/apache/spark/ContextCleaner.scala#L235-L241
   
   
https://github.com/apache/spark/blob/339d1c9d9d50bce63316ac788626bea998e71b06/sql/core/src/main/scala/org/apache/spark/sql/execution/SQLExecution.scala#L177-L183
   
   


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