tillrohrmann commented on a change in pull request #12054:
URL: https://github.com/apache/flink/pull/12054#discussion_r444097983
##########
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:
I think this should be fine. The {{ResourceID}} is defined to contain a
string field.
----------------------------------------------------------------
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]