public class AkkaRpcServiceUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AkkaRpcServiceUtils.AkkaProtocol
Whether to use TCP or encrypted TCP for Akka.
|
static class |
AkkaRpcServiceUtils.AkkaRpcServiceBuilder
Builder for
AkkaRpcService. |
| Modifier and Type | Method and Description |
|---|---|
static String |
createRandomName(String prefix)
Creates a random name of the form prefix_X, where X is an increasing number.
|
static AkkaRpcService |
createRemoteRpcService(org.apache.flink.configuration.Configuration configuration,
String externalAddress,
String externalPortRange,
String bindAddress,
Optional<Integer> bindPort) |
static String |
createWildcardName(String prefix)
Creates a wildcard name symmetric to
createRandomName(String). |
static long |
extractMaximumFramesize(org.apache.flink.configuration.Configuration configuration) |
static String |
getLocalRpcUrl(String endpointName) |
static String |
getRpcUrl(String hostname,
int port,
String endpointName,
HighAvailabilityServicesUtils.AddressResolution addressResolution,
AkkaRpcServiceUtils.AkkaProtocol akkaProtocol) |
static String |
getRpcUrl(String hostname,
int port,
String endpointName,
HighAvailabilityServicesUtils.AddressResolution addressResolution,
org.apache.flink.configuration.Configuration config) |
static AkkaRpcServiceUtils.AkkaRpcServiceBuilder |
localServiceBuilder(org.apache.flink.configuration.Configuration configuration) |
static AkkaRpcServiceUtils.AkkaRpcServiceBuilder |
remoteServiceBuilder(org.apache.flink.configuration.Configuration configuration,
String externalAddress,
int externalPort) |
static AkkaRpcServiceUtils.AkkaRpcServiceBuilder |
remoteServiceBuilder(org.apache.flink.configuration.Configuration configuration,
String externalAddress,
String externalPortRange) |
public static AkkaRpcService createRemoteRpcService(org.apache.flink.configuration.Configuration configuration, @Nullable String externalAddress, String externalPortRange, @Nullable String bindAddress, Optional<Integer> bindPort) throws Exception
Exceptionpublic static AkkaRpcServiceUtils.AkkaRpcServiceBuilder remoteServiceBuilder(org.apache.flink.configuration.Configuration configuration, @Nullable String externalAddress, String externalPortRange)
@VisibleForTesting public static AkkaRpcServiceUtils.AkkaRpcServiceBuilder remoteServiceBuilder(org.apache.flink.configuration.Configuration configuration, @Nullable String externalAddress, int externalPort)
public static AkkaRpcServiceUtils.AkkaRpcServiceBuilder localServiceBuilder(org.apache.flink.configuration.Configuration configuration)
public static String getRpcUrl(String hostname, int port, String endpointName, HighAvailabilityServicesUtils.AddressResolution addressResolution, org.apache.flink.configuration.Configuration config) throws UnknownHostException
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.UnknownHostExceptionpublic static String getRpcUrl(String hostname, int port, String endpointName, HighAvailabilityServicesUtils.AddressResolution addressResolution, AkkaRpcServiceUtils.AkkaProtocol akkaProtocol) throws UnknownHostException
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.akkaProtocol - True, if security/encryption is enabled, false otherwise.UnknownHostExceptionpublic static String createRandomName(String prefix)
prefix - Prefix string to prepend to the monotonically increasing name offset numberpublic static String createWildcardName(String prefix)
createRandomName(String).prefix - prefix of the wildcard namepublic static long extractMaximumFramesize(org.apache.flink.configuration.Configuration configuration)
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.