Class PekkoRpcServiceUtils
- java.lang.Object
-
- org.apache.flink.runtime.rpc.pekko.PekkoRpcServiceUtils
-
public class PekkoRpcServiceUtils extends Object
These RPC utilities contain helper methods around RPC use, such as starting an RPC service, or constructing RPC addresses.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPekkoRpcServiceUtils.ProtocolWhether to use TCP or encrypted TCP for Pekko.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
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
-
isRecipientTerminatedException
public static boolean isRecipientTerminatedException(Throwable exception)
-
extractMaximumFramesize
public static long extractMaximumFramesize(org.apache.flink.configuration.Configuration configuration)
-
-