tillrohrmann commented on a change in pull request #11284:
[FLINK-15911][runtime] Make Flink work with NAT.
URL: https://github.com/apache/flink/pull/11284#discussion_r396521581
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java
##########
@@ -261,26 +258,30 @@ public void start() throws Exception {
// bring up all the RPC services
LOG.info("Starting RPC Service(s)");
- AkkaRpcServiceConfiguration
akkaRpcServiceConfig =
AkkaRpcServiceConfiguration.fromConfiguration(configuration);
-
final RpcServiceFactory
dispatcherResourceManagreComponentRpcServiceFactory;
if (useSingleRpcService) {
// we always need the
'commonRpcService' for auxiliary calls
- commonRpcService =
createRpcService(akkaRpcServiceConfig, false, null);
+ commonRpcService =
createLocalRpcService(configuration);
final CommonRpcServiceFactory
commonRpcServiceFactory = new CommonRpcServiceFactory(commonRpcService);
taskManagerRpcServiceFactory =
commonRpcServiceFactory;
dispatcherResourceManagreComponentRpcServiceFactory = commonRpcServiceFactory;
} else {
- // we always need the
'commonRpcService' for auxiliary calls
- commonRpcService =
createRpcService(akkaRpcServiceConfig, true, null);
// start a new service per component,
possibly with custom bind addresses
final String jobManagerBindAddress =
miniClusterConfiguration.getJobManagerBindAddress();
final String taskManagerBindAddress =
miniClusterConfiguration.getTaskManagerBindAddress();
+ final String jobManagerBindPort =
miniClusterConfiguration.getJobManagerBindPortRange();
+ final String taskManagerBindPort =
miniClusterConfiguration.getTaskManagerBindPortRange();
+
+
dispatcherResourceManagreComponentRpcServiceFactory =
+ new
DedicatedRpcServiceFactory(configuration, jobManagerBindAddress,
jobManagerBindPort);
Review comment:
Do we really want to support a bind port here? The problem is that we would
have to support a bind port range because the factory can create multiple rpc
services. Not sure whether it makes sense to support the bind port here. Maybe
it is good enough to say that we don't support the bind options for the
`MiniCluster`. WDYT?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services