flink在LeadingElectionservice.java
中有以下评论https://github.com/apache/flink/blob/master/master/flink-runtime/src/main/java/java/java/org/apache/flink/flink/runtime/leadeerelection/leadeerelectionservionservice.java#l26
此类意图处理哪种争论?
* Interface for a service which allows to elect a leader among
a group of contenders.
* Prior to using this service, it has to be started calling
the start method. The start method
* takes the contender as a parameter. If there are multiple
contenders, then each contender has
* to instantiate its own leader election service.
从弗林克1.8开始,有两个类实现LeaderContender
接口。 JobManagerRunner
和WebMonitorEndpoint
需要高可用性,并且需要Leadereletectionservice。
public class JobManagerRunner implements LeaderContender,
OnCompletionActions, AutoCloseableAsync {...
public class WebMonitorEndpoint<T extends RestfulGateway>
extends RestServerEndpoint implements LeaderContender, JsonArchivist {...