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_r396554778
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/TaskManagerLocation.java
 ##########
 @@ -90,6 +93,14 @@ public TaskManagerLocation(ResourceID resourceID, 
InetAddress inetAddress, int d
                                "%s @ %s (dataPort=%d)", resourceID, 
fqdnHostName, dataPort);
        }
 
+       public static TaskManagerLocation fromUnresolvedLocation(final 
TaskManagerUnresolvedLocation unresolvedLocation)
+               throws UnknownHostException {
+               return new TaskManagerLocation(
+                       unresolvedLocation.getResourceID(),
+                       
InetAddress.getByName(unresolvedLocation.getExternalAddress()),
+                       unresolvedLocation.getDataPort());
+       }
 
 Review comment:
   Nice :-)

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

Reply via email to