0
votes

Flink has the following comment in LeaderElectionService.java

https://github.com/apache/flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/LeaderElectionService.java#L26

What kind of contention does this class intent to handle?

 * 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
What do You mean by kind of contenders ?Dominik Wosiński

1 Answers

0
votes

As of Flink 1.8, there are two classes that implement LeaderContender interface. JobManagerRunner and WebMonitorEndpoint need high availability, and need a LeaderElectionService.

public class JobManagerRunner implements LeaderContender, 
                     OnCompletionActions, AutoCloseableAsync {...

public class WebMonitorEndpoint<T extends RestfulGateway> 
    extends RestServerEndpoint implements LeaderContender, JsonArchivist {...