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_r396546590
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java
 ##########
 @@ -571,9 +572,16 @@ private void releaseEmptyTaskManager(ResourceID 
resourceId) {
        @Override
        public CompletableFuture<RegistrationResponse> registerTaskManager(
                        final String taskManagerRpcAddress,
-                       final TaskManagerLocation taskManagerLocation,
+                       final TaskManagerUnresolvedLocation 
taskManagerUnresolvedLocation,
                        final Time timeout) {
 
+               final TaskManagerLocation taskManagerLocation;
+               try {
+                       taskManagerLocation = 
TaskManagerLocation.fromUnresolvedLocation(taskManagerUnresolvedLocation);
+               } catch (Throwable throwable) {
+                       return CompletableFuture.completedFuture(new 
RegistrationResponse.Decline(throwable.getMessage()));
 
 Review comment:
   I would add a log message saying that we could not accept the registration 
of a `TaskManager` because its address could not be resolved.
   
   Maybe we could add this to the `Decline` message as well.

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