org.apache.flink.runtime.rpc.akka.AkkaRpcServiceConfiguration Java Examples
The following examples show how to use
org.apache.flink.runtime.rpc.akka.AkkaRpcServiceConfiguration.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MiniCluster.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
/** * Factory method to instantiate the RPC service. * * @param akkaRpcServiceConfig * The default RPC timeout for asynchronous "ask" requests. * @param remoteEnabled * True, if the RPC service should be reachable from other (remote) RPC services. * @param bindAddress * The address to bind the RPC service to. Only relevant when "remoteEnabled" is true. * * @return The instantiated RPC service */ protected RpcService createRpcService( AkkaRpcServiceConfiguration akkaRpcServiceConfig, boolean remoteEnabled, String bindAddress) { final Config akkaConfig; if (remoteEnabled) { akkaConfig = AkkaUtils.getAkkaConfig(akkaRpcServiceConfig.getConfiguration(), bindAddress, 0); } else { akkaConfig = AkkaUtils.getAkkaConfig(akkaRpcServiceConfig.getConfiguration()); } final Config effectiveAkkaConfig = AkkaUtils.testDispatcherConfig().withFallback(akkaConfig); final ActorSystem actorSystem = AkkaUtils.createActorSystem(effectiveAkkaConfig); return new AkkaRpcService(actorSystem, akkaRpcServiceConfig); }
Example #2
Source File: MiniCluster.java From flink with Apache License 2.0 | 6 votes |
/** * Factory method to instantiate the RPC service. * * @param akkaRpcServiceConfig * The default RPC timeout for asynchronous "ask" requests. * @param remoteEnabled * True, if the RPC service should be reachable from other (remote) RPC services. * @param bindAddress * The address to bind the RPC service to. Only relevant when "remoteEnabled" is true. * * @return The instantiated RPC service */ protected RpcService createRpcService( AkkaRpcServiceConfiguration akkaRpcServiceConfig, boolean remoteEnabled, String bindAddress) { final Config akkaConfig; if (remoteEnabled) { akkaConfig = AkkaUtils.getAkkaConfig(akkaRpcServiceConfig.getConfiguration(), bindAddress, 0); } else { akkaConfig = AkkaUtils.getAkkaConfig(akkaRpcServiceConfig.getConfiguration()); } final Config effectiveAkkaConfig = AkkaUtils.testDispatcherConfig().withFallback(akkaConfig); final ActorSystem actorSystem = AkkaUtils.createActorSystem(effectiveAkkaConfig); return new AkkaRpcService(actorSystem, akkaRpcServiceConfig); }
Example #3
Source File: RemoteMiniClusterImpl.java From beam with Apache License 2.0 | 6 votes |
@Override protected RpcService createRpcService( AkkaRpcServiceConfiguration akkaRpcServiceConfig, boolean remoteEnabled, String bindAddress) { // Enable remote connections to the mini cluster which are disabled by default final Config akkaConfig = AkkaUtils.getAkkaConfig(akkaRpcServiceConfig.getConfiguration(), bindAddress, 0); final Config effectiveAkkaConfig = AkkaUtils.testDispatcherConfig().withFallback(akkaConfig); final ActorSystem actorSystem = AkkaUtils.createActorSystem(effectiveAkkaConfig); final AkkaRpcService akkaRpcService = new AkkaRpcService(actorSystem, akkaRpcServiceConfig); this.port = akkaRpcService.getPort(); return akkaRpcService; }
Example #4
Source File: TestingRpcService.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
/** * Creates a new {@code TestingRpcService}, using the given configuration. */ public TestingRpcService(Configuration configuration) { super(AkkaUtils.createLocalActorSystem(configuration), AkkaRpcServiceConfiguration.fromConfiguration(configuration)); this.registeredConnections = new ConcurrentHashMap<>(); }
Example #5
Source File: TestingRpcService.java From flink with Apache License 2.0 | 5 votes |
/** * Creates a new {@code TestingRpcService}, using the given configuration. */ public TestingRpcService(Configuration configuration) { super(AkkaUtils.createLocalActorSystem(configuration), AkkaRpcServiceConfiguration.fromConfiguration(configuration)); this.registeredConnections = new ConcurrentHashMap<>(); }
Example #6
Source File: TestingRpcService.java From flink with Apache License 2.0 | 5 votes |
/** * Creates a new {@code TestingRpcService}, using the given configuration. */ public TestingRpcService(Configuration configuration) { super(AkkaUtils.createLocalActorSystem(configuration), AkkaRpcServiceConfiguration.fromConfiguration(configuration)); this.registeredConnections = new ConcurrentHashMap<>(); }
Example #7
Source File: MiniCluster.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
DedicatedRpcServiceFactory(AkkaRpcServiceConfiguration akkaRpcServiceConfig, String jobManagerBindAddress) { this.akkaRpcServiceConfig = akkaRpcServiceConfig; this.jobManagerBindAddress = jobManagerBindAddress; }
Example #8
Source File: RpcEndpointTest.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@BeforeClass public static void setup() { actorSystem = AkkaUtils.createDefaultActorSystem(); rpcService = new AkkaRpcService(actorSystem, AkkaRpcServiceConfiguration.defaultConfiguration()); }
Example #9
Source File: MiniCluster.java From flink with Apache License 2.0 | 4 votes |
DedicatedRpcServiceFactory(AkkaRpcServiceConfiguration akkaRpcServiceConfig, String jobManagerBindAddress) { this.akkaRpcServiceConfig = akkaRpcServiceConfig; this.jobManagerBindAddress = jobManagerBindAddress; }
Example #10
Source File: RpcEndpointTest.java From flink with Apache License 2.0 | 4 votes |
@BeforeClass public static void setup() { actorSystem = AkkaUtils.createDefaultActorSystem(); rpcService = new AkkaRpcService(actorSystem, AkkaRpcServiceConfiguration.defaultConfiguration()); }
Example #11
Source File: RpcEndpointTest.java From flink with Apache License 2.0 | 4 votes |
@BeforeClass public static void setup() { actorSystem = AkkaUtils.createDefaultActorSystem(); rpcService = new AkkaRpcService(actorSystem, AkkaRpcServiceConfiguration.defaultConfiguration()); }