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_r395201803
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/entrypoint/ClusterEntrypoint.java
##########
@@ -248,10 +247,14 @@ protected void initializeServices(Configuration
configuration) throws Exception
LOG.info("Initializing cluster services.");
synchronized (lock) {
- final String bindAddress =
configuration.getString(JobManagerOptions.ADDRESS);
- final String portRange = getRPCPortRange(configuration);
-
- commonRpcService = createRpcService(configuration,
bindAddress, portRange);
+ commonRpcService =
AkkaRpcServiceUtils.createRemoteRpcService(
+ configuration,
+
configuration.getString(JobManagerOptions.ADDRESS),
+ getRPCPortRange(configuration),
+
configuration.getString(JobManagerOptions.BIND_HOST),
+
configuration.contains(JobManagerOptions.RPC_BIND_PORT) ?
+
configuration.getInteger(JobManagerOptions.RPC_BIND_PORT) :
+ null);
Review comment:
I'm not entirely sure whether a nullable `Integer` is the best way to encode
that we have an optional bind port. Maybe consider using `Optional` to better
express this contract.
----------------------------------------------------------------
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