flink在leaderelectionservice.java中有以下注解
https://github.com/apache/flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/leaderelectionservice.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条答案
按热度按时间k2arahey1#
从flink1.8开始,有两个类实现了
LeaderContender
接口。JobManagerRunner
以及WebMonitorEndpoint
需要高可用性,并且需要LeaderDirection服务。