flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tillrohrmann <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-2996] Introduce configuration parameter...
Date Tue, 24 Nov 2015 13:24:04 GMT
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1394#discussion_r45733621
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobServer.java ---
    @@ -137,12 +139,29 @@ else if (config.containsKey(ConfigConstants.STATE_BACKEND) &&
     			this.shutdownHook = null;
     		}
     
    -		// start the server
    -		try {
    -			this.serverSocket = new ServerSocket(0, backlog);
    +		//  ----------------------- start the server -------------------
    +
    +		String serverPortRange = config.getString(ConfigConstants.BLOB_SERVER_PORT, ConfigConstants.DEFAULT_BLOB_SERVER_PORT);
    +		Iterator<Integer> ports = NetUtils.getPortRangeFromString(serverPortRange).iterator();
    +
    +		ServerSocket socketAttempt = null;
    +		while(ports.hasNext()) {
    --- End diff --
    
    Why do you have to test all ports here. Isn't it enough to take the first port for which
you can open a socket? Or is it important that you always take the last available port?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message