azagrebin commented on a change in pull request #8191: [FLINK-12213][network] 
Pass TaskManagerMetricGroup into constructor of NetworkEnvironment
URL: https://github.com/apache/flink/pull/8191#discussion_r276243755
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/TaskManagerLocation.java
 ##########
 @@ -82,30 +82,9 @@ public TaskManagerLocation(ResourceID resourceID, 
InetAddress inetAddress, int d
                this.dataPort = dataPort;
 
                // get FQDN hostname on this TaskManager.
-               String fqdnHostName;
-               try {
-                       fqdnHostName = this.inetAddress.getCanonicalHostName();
-               }
-               catch (Throwable t) {
-                       LOG.warn("Unable to determine the canonical hostname. 
Input split assignment (such as " +
-                                       "for HDFS files) may be non-local when 
the canonical hostname is missing.");
-                       LOG.debug("getCanonicalHostName() Exception:", t);
-                       fqdnHostName = this.inetAddress.getHostAddress();
-               }
-               this.fqdnHostName = fqdnHostName;
+               this.fqdnHostName = getFqdnHostName(inetAddress);
 
 Review comment:
   Also, nice simplification, but probably for a separate commit?

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