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.
  • 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

      public static String getLocalRpcUrl(String endpointName)
    • isRecipientTerminatedException

      public static boolean isRecipientTerminatedException(Throwable exception)
    • extractMaximumFramesize

      public static long extractMaximumFramesize(org.apache.flink.configuration.Configuration configuration)