You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/10/18 14:17:11 UTC

[GitHub] GJL commented on issue #6557: [FLINK-10149] [flink-mesos] Don't allocate extra mesos port for TM unless configured to do so.

GJL commented on issue #6557: [FLINK-10149] [flink-mesos] Don't allocate extra mesos port for TM unless configured to do so.
URL: https://github.com/apache/flink/pull/6557#issuecomment-431026453
 
 
   I have a question about code that was not touched in this PR but in an earlier one. Below is an extract from `LaunchableMesosWorker#launch()`:
   ```
   Set<String> tmPortKeys = extractPortKeys(containerSpec.getDynamicConfiguration());
   List<Protos.Resource> portResources = allocation.takeRanges("ports", tmPortKeys.size(), roles);
   taskInfo.addAllResources(portResources);
   Iterator<String> portsToAssign = tmPortKeys.iterator();
   rangeValues(portResources).forEach(port -> dynamicProperties.setLong(portsToAssign.next(), port));
   if (portsToAssign.hasNext()) {
   	throw new IllegalArgumentException("insufficient # of ports assigned");
   }
   ```
   Judging by the code, I can only assume that port ranges are not allowed, i.e., it is illegal to receive a port `Resource` where `begin != end`. I am not a Mesos expert – can you tell me whether my assumption is correct? If yes, additional checks should be added to `rangeValues` because this function allows port ranges, which can cause confusion.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services