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

    https://github.com/apache/spark/pull/5116#discussion_r28472303
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/Client.scala ---
    @@ -122,20 +133,43 @@ private class ClientActor(driverArgs: 
ClientArguments, conf: SparkConf)
     
         case SubmitDriverResponse(success, driverId, message) =>
           println(message)
    -      if (success) pollAndReportStatus(driverId.get) else System.exit(-1)
    +      if (success) {
    +        activeMasterActor = context.actorSelection(sender.path)
    +        pollAndReportStatus(driverId.get)
    +      } else if (!message.startsWith(Utils.MASTER_NOT_ALIVE_STRING)) {
    +        System.exit(-1)
    +      }
    +
     
         case KillDriverResponse(driverId, success, message) =>
           println(message)
    -      if (success) pollAndReportStatus(driverId) else System.exit(-1)
    +      if (success) {
    +        activeMasterActor = context.actorSelection(sender.path)
    +        pollAndReportStatus(driverId)
    +      } else if (!message.startsWith(Utils.MASTER_NOT_ALIVE_STRING)) {
    +        System.exit(-1)
    +      }
     
         case DisassociatedEvent(_, remoteAddress, _) =>
    -      println(s"Error connecting to master ${driverArgs.master} 
($remoteAddress), exiting.")
    -      System.exit(-1)
    +      if (!lostMasters.contains(remoteAddress)) {
    +        println(s"Error connecting to master $remoteAddress.")
    +        lostMasters += remoteAddress
    +        if (lostMasters.size >= masterActors.size) {
    --- End diff --
    
    This line needs a big comment:
    ```
    // Note that this heuristic does not account for the fact that a Master can 
recover
    // within the lifetime of this client. Thus, once a Master is lost it is 
lost to us forever.
    ```


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