kien-truong opened a new pull request #15704:
URL: https://github.com/apache/flink/pull/15704


   ## What is the purpose of the change
   This change adds support for setting a port range for a TaskManager data 
port, which allows multiple TaskManager to run on the same machine without 
having to use a random port.
   
   ## Brief change log
   
   - Change value type of `taskmanager.data.bind-port` from Integer to String.
   - Use `NetUtils.getPortRangeFromString` to generate the list of ports that 
can be used from the value of `taskmanager.data.bind-port`
   - When starting up TaskManager's NettyServer, try to bind to the ports from 
the configured range sequentially, returning on the first success.
   - Add documents for previously undocumented `taskmanager.data.bind-port`
   
   ## Verifying this change
   
   - `NetUtils.getPortRangeFromString` is reused and already covered by 
existing tests.
   - Add basic unittest: `NettyServerMultiPortsTest`, to verify that you can 
start 2 NettyServer concurrently without conflict by setting multiple ports in 
`taskmanager.data.bind-port`
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? yes
     - If yes, how is the feature documented? docs
   


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


Reply via email to