Package org.apache.flink.runtime.util
Class LeaderRetrievalUtils
java.lang.Object
org.apache.flink.runtime.util.LeaderRetrievalUtils
Utility class to work with
LeaderRetrievalService class.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHelper class which is used by the retrieveLeaderInformation method to retrieve the leader's rpc URL and the current leader session ID. -
Method Summary
Modifier and TypeMethodDescriptionstatic InetAddressfindConnectingAddress(LeaderRetrievalService leaderRetrievalService, Duration timeout, org.apache.flink.runtime.rpc.RpcSystemUtils rpcSystemUtils) static LeaderInformationretrieveLeaderInformation(LeaderRetrievalService leaderRetrievalService, Duration timeout) Retrieves the leader pekko url and the current leader session ID.
-
Method Details
-
retrieveLeaderInformation
public static LeaderInformation retrieveLeaderInformation(LeaderRetrievalService leaderRetrievalService, Duration timeout) throws LeaderRetrievalException Retrieves the leader pekko url and the current leader session ID. The values are stored in aLeaderInformationinstance.- Parameters:
leaderRetrievalService- Leader retrieval service to retrieve the leader connection informationtimeout- Timeout when to give up looking for the leader- Returns:
- LeaderInformation containing the leader's rpc URL and the current leader session ID
- Throws:
LeaderRetrievalException
-
findConnectingAddress
public static InetAddress findConnectingAddress(LeaderRetrievalService leaderRetrievalService, Duration timeout, org.apache.flink.runtime.rpc.RpcSystemUtils rpcSystemUtils) throws LeaderRetrievalException - Throws:
LeaderRetrievalException
-