Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/5116#discussion_r27706746
--- Diff: core/src/main/scala/org/apache/spark/deploy/Client.scala ---
@@ -115,27 +121,50 @@ private class ClientActor(driverArgs:
ClientArguments, conf: SparkConf)
System.exit(-1)
}
System.exit(0)
- }
+ }
}
override def receiveWithLogging: PartialFunction[Any, Unit] = {
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.contains("Can only")) {
+ 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.contains("Can only")) {
+ 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 >= mastersActor.size) {
+ println(s"No master is available, exiting.")
--- End diff --
No need for the "s" here
---
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]