Class PekkoRpcServiceUtils
java.lang.Object
org.apache.flink.runtime.rpc.pekko.PekkoRpcServiceUtils
These RPC utilities contain helper methods around RPC use, such as starting an RPC service, or
constructing RPC addresses.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhether to use TCP or encrypted TCP for Pekko. -
Method Summary
Modifier and TypeMethodDescriptionstatic longextractMaximumFramesize(org.apache.flink.configuration.Configuration configuration) static StringgetLocalRpcUrl(String endpointName) static StringgetRpcUrl(String hostname, int port, String endpointName, org.apache.flink.runtime.rpc.AddressResolution addressResolution, org.apache.flink.configuration.Configuration config) static StringgetRpcUrl(String hostname, int port, String endpointName, org.apache.flink.runtime.rpc.AddressResolution addressResolution, PekkoRpcServiceUtils.Protocol protocol) static booleanisRecipientTerminatedException(Throwable exception)
-
Method Details
-
getRpcUrl
public static String getRpcUrl(String hostname, int port, String endpointName, org.apache.flink.runtime.rpc.AddressResolution addressResolution, org.apache.flink.configuration.Configuration config) throws UnknownHostException - Parameters:
hostname- The hostname or address where the target RPC service is listening.port- The port where the target RPC service is listening.endpointName- The name of the RPC endpoint.addressResolution- Whether to try address resolution of the given hostname or not. This allows to fail fast in case that the hostname cannot be resolved.config- The configuration from which to deduce further settings.- Returns:
- The RPC URL of the specified RPC endpoint.
- Throws:
UnknownHostException
-
getRpcUrl
public static String getRpcUrl(String hostname, int port, String endpointName, org.apache.flink.runtime.rpc.AddressResolution addressResolution, PekkoRpcServiceUtils.Protocol protocol) throws UnknownHostException - Parameters:
hostname- The hostname or address where the target RPC service is listening.port- The port where the target RPC service is listening.endpointName- The name of the RPC endpoint.addressResolution- Whether to try address resolution of the given hostname or not. This allows to fail fast in case that the hostname cannot be resolved.protocol- True, if security/encryption is enabled, false otherwise.- Returns:
- The RPC URL of the specified RPC endpoint.
- Throws:
UnknownHostException
-
getLocalRpcUrl
-
isRecipientTerminatedException
-
extractMaximumFramesize
public static long extractMaximumFramesize(org.apache.flink.configuration.Configuration configuration)
-