tillrohrmann commented on a change in pull request #7745: [FLINK-11632] Add new
config option for TaskManager automatic address binding
URL: https://github.com/apache/flink/pull/7745#discussion_r258528215
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerRunner.java
##########
@@ -409,13 +409,30 @@ public static RpcService createRpcService(
if (taskManagerHostname != null) {
LOG.info("Using configured hostname/address for
TaskManager: {}.", taskManagerHostname);
} else {
- Time lookupTimeout =
Time.milliseconds(AkkaUtils.getLookupTimeout(configuration).toMillis());
-
- InetAddress taskManagerAddress =
LeaderRetrievalUtils.findConnectingAddress(
- haServices.getResourceManagerLeaderRetriever(),
- lookupTimeout);
-
- taskManagerHostname = taskManagerAddress.getHostName();
+ InetAddress taskManagerAddress;
+
+ String bindPolicy =
configuration.getString(TaskManagerOptions.HOST_BIND_POLICY);
+ switch (bindPolicy.toLowerCase()) {
+ case "hostname":
Review comment:
could be an enum. We could then also use enum to generate the description
for `HOST_BIND_POLICY`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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