Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1416#discussion_r46819640
  
    --- Diff: flink-core/src/main/java/org/apache/flink/util/NetUtils.java ---
    @@ -196,4 +198,35 @@ public static String hostAndPortToUrlString(String 
host, int port) throws Unknow
                }
                return finalSet;
        }
    +
    +   /**
    +    * Tries to allocate a socket from the given sets of ports.
    +    *
    +    * @param portsSet A set of ports to choose from. The method will 
remove the ports from the set!
    +    * @param factory A factory for creating the SocketServer
    +    * @param logger Logger instance
    +    * @return null if no port was available or an allocated socket.
    +    */
    +   public static ServerSocket createSocketFromPorts(Set<Integer> portsSet, 
SocketFactory factory, Logger logger) throws IOException {
    --- End diff --
    
    Why do you pass the logger as a parameter to the method? That way, it is 
really hard to know from where the actual logging call was executed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to