Github user aarondav commented on the pull request:
https://github.com/apache/spark/pull/771#issuecomment-43535796
@ScrapCodes, I definitely like the idea. I think we need to update the API
a little before it's ready to be publicly accessible, though. First,
LeaderElectionAgent and PersistenceEngine should be `@DeveloperApi` and not
`private[spark]`.
Second, LeaderElectionAgent should be refactored to not be an Actor (there
is a TODO since the Curator refactor, I think it just needs to be done before
we can finalize this API). This should be pretty straightforward to do, I would
just add a trait like
```scala
trait LeaderElectable {
def electedLeader()
def revokedLeadership()
}
```
which Master implements by simply calling `self ! ElectedLeader`, for
instance, to ensure we maintain the thread safety of the actor without leaking
the actor abstraction.
---
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.
---