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



##########
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:
       Well my only concern is whether it is safe to put some special 
characters(e.g. `:`) in the `ResourceID`. I am not aware of this could happen.




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