Github user mccheah commented on a diff in the pull request:
https://github.com/apache/spark/pull/2828#discussion_r18978981
--- Diff: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala
---
@@ -362,9 +372,19 @@ private[spark] class Worker(
}
}
- def masterDisconnected() {
+ private def masterDisconnected() {
logError("Connection to master failed! Waiting for master to
reconnect...")
connected = false
+ scheduleAttemptsToReconnectToMaster()
+ }
+
+ private def scheduleAttemptsToReconnectToMaster() {
--- End diff --
The logic would need to be refactored a bit, but it might be doable. It
uses the registered flag to determine if it should stop attempts to
re-register, and otherwise attempts to reconnect.
If we toggle the registered flag upon disassociation as well we might be
able to just call registerWithMaster(). However, I'm not sure what the
implications of that are. Also, do we necessarily want the worker to give up
reconnection after a certain number of retries in this case?
---
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]