tillrohrmann commented on a change in pull request #12054:
URL: https://github.com/apache/flink/pull/12054#discussion_r443620557



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerRunner.java
##########
@@ -458,4 +462,11 @@ private static String 
determineTaskManagerBindAddressByConnectingToResourceManag
                HostBindPolicy bindPolicy = 
HostBindPolicy.fromString(configuration.getString(TaskManagerOptions.HOST_BIND_POLICY));
                return bindPolicy == HostBindPolicy.IP ? 
taskManagerAddress.getHostAddress() : taskManagerAddress.getHostName();
        }
+
+       @VisibleForTesting
+       static ResourceID getTaskManagerResourceID(Configuration config) throws 
Exception {
+               final String resourceID = 
config.get(TaskManagerOptions.TASK_MANAGER_RESOURCE_ID);
+               return resourceID != null ?
+                       new ResourceID(resourceID) : new 
ResourceID(InetAddress.getLocalHost().getHostName() + "-" + new 
AbstractID().toString().substring(0, 6));

Review comment:
       By creating the `ResourceID` after the `RpcService` has been started, 
one could obtain this information.




----------------------------------------------------------------
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]


Reply via email to