I think at the moment SingleLeaderElectionService is not really used since it is part of the YarnIntraNonHaMasterServices. The idea of these ha services was to offer a different ha implementation which slightly different guarantees. Concretely, the YarnIntraNonHaMasterServices handle operator and TaskManager faults but not master faults.
The EmbeddedHaServices are only used by the MiniCluster. I'm not so sure whether the refactoring is so easy because EmbeddedLeaderElectionService is an inner class of EmbeddedLeaderService and calls methods of this class. Why do you wanna change anything there? Cheers, Till On Fri, Aug 2, 2019 at 6:33 AM Zili Chen <wander4...@gmail.com> wrote: > Hi devs, > > I found that these two classes are quite similar except > SingleLeaderElectionService has a pre-config leader id. > > However, I don't see use points of that leader id. Also > a random UUID would work as a DEFAULT_LEADER_ID(0). > I consider whether we could replace SingleLeaderElectionService > with EmbeddedLeaderElectionService, or merge. > > Best, > tison. >