public class AkkaRpcServiceUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AkkaRpcServiceUtils.AkkaProtocol
Whether to use TCP or encrypted TCP for Akka.
|
| 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 RpcService |
createRpcService(String hostname,
int port,
org.apache.flink.configuration.Configuration configuration)
Utility method to create RPC service from configuration and hostname, port.
|
static RpcService |
createRpcService(String hostname,
String portRangeDefinition,
org.apache.flink.configuration.Configuration configuration)
Utility method to create RPC service from configuration and hostname, port.
|
static RpcService |
createRpcService(String hostname,
String portRangeDefinition,
org.apache.flink.configuration.Configuration configuration,
String actorSystemName,
BootstrapTools.ActorSystemExecutorConfiguration actorSystemExecutorConfiguration)
Utility method to create RPC service from configuration and hostname, port.
|
static long |
extractMaximumFramesize(org.apache.flink.configuration.Configuration configuration) |
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) |
public static RpcService createRpcService(String hostname, String portRangeDefinition, org.apache.flink.configuration.Configuration configuration) throws Exception
hostname - The hostname/address that describes the TaskManager's data location.portRangeDefinition - The port range to start TaskManager on.configuration - The configuration for the TaskManager.IOException - Thrown, if the actor system can not bind to the addressException - Thrown is some other error occurs while creating akka actor systempublic static RpcService createRpcService(String hostname, int port, org.apache.flink.configuration.Configuration configuration) throws Exception
hostname - The hostname/address that describes the TaskManager's data location.port - If true, the TaskManager will not initiate the TCP network stack.configuration - The configuration for the TaskManager.IOException - Thrown, if the actor system can not bind to the addressException - Thrown is some other error occurs while creating akka actor systempublic static RpcService createRpcService(String hostname, String portRangeDefinition, org.apache.flink.configuration.Configuration configuration, String actorSystemName, @Nonnull BootstrapTools.ActorSystemExecutorConfiguration actorSystemExecutorConfiguration) throws Exception
hostname - The hostname/address that describes the TaskManager's data location.portRangeDefinition - The port range to start TaskManager on.configuration - The configuration for the TaskManager.actorSystemName - The actor system name of the RpcService.actorSystemExecutorConfiguration - The configuration of the executor of the actor system.IOException - Thrown, if the actor system can not bind to the addressException - Thrown is some other error occurs while creating akka actor systempublic 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 long extractMaximumFramesize(org.apache.flink.configuration.Configuration configuration)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.