xintongsong 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_r395426615
 
 

 ##########
 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();
 
 Review comment:
   No, and I don't think we should.
   
   Whenever the user needs to specify a bind port apart form the external port, 
the user also needs to set port forwarding rules in the environment, e.g. NAT 
gateway. For each external port, it can only be forwarded to one internal port. 
Therefore, it does not make sense to support a range of bind ports, because the 
user needs to know which internal port is bound anyway.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to