- Contends for the leadership of a service in JobManager. There are four components in a JobManager instance that use LeaderElectionService: ResourceManager, Dispatcher, JobManager, RestEndpoint(aka WebMonitor).
- Once the leader election is finished, the active leader addresses will be stored in the ConfigMap so that other components could retrieve successfully.
- Used by Client to get the RestEndpoint address for the job submission.
- Used by JobManager to get the ResourceManager address for registration.
- Used by TaskManagers to retrieve addresses of the corresponding LeaderElectionService(e.g. JobManager address, ResourceManager address) for registration and offering slots