Github user lianhuiwang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3962#discussion_r22910916
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/YarnSchedulerBackend.scala
 ---
    @@ -94,12 +91,14 @@ private[spark] abstract class YarnSchedulerBackend(
       /**
        * An actor that communicates with the ApplicationMaster.
        */
    -  private class YarnSchedulerActor extends Actor {
    +  protected class YarnSchedulerActor(isDriver: Boolean)  extends Actor {
         private var amActor: Option[ActorRef] = None
     
         override def preStart(): Unit = {
           // Listen for disassociation events
    -      context.system.eventStream.subscribe(self, 
classOf[RemotingLifecycleEvent])
    +      if (!isDriver) {
    +        context.system.eventStream.subscribe(self, 
classOf[RemotingLifecycleEvent])
    +      }
    --- End diff --
    
    because in cluster mode, YarnSchedulerActor and driver  use same 
actorSystem, if YarnSchedulerActor subscribe and listen driver's actor, 
messages from driver's actor that should to send to executor will send to 
YarnSchedulerActor .so there is a big wrong and we cannot listen for cluster 
mode.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to