Github user rsltrifork commented on a diff in the pull request:
https://github.com/apache/flink/pull/6288#discussion_r201645393
--- Diff:
flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/LaunchableMesosWorker.java
---
@@ -332,6 +334,22 @@ public String toString() {
return taskInfo.build();
}
+ /**
+ * Get port keys representing the TM's configured endpoints. This
includes mandatory TM endpoints such as
+ * data and rpc as well as optionally configured endpoints for services
such as prometheus reporter
+ *
+ * @return A deterministicly ordered Set of port keys to expose from
the TM container
+ */
+ private Set<String> getPortKeys() {
+ LinkedHashSet<String> tmPortKeys = new
LinkedHashSet<>(Arrays.asList(TM_PORT_KEYS));
--- End diff --
Yes, ranges are allowed as value. In fact *anything* is allowed as value,
because the implementation does not look at which value is assigned to a port
key. It always overrules your assigned port value and replaces it with a single
port provided by Mesos.
My understanding is, that port ranges in the first place are only used for
one purpose: To allow picking a single available port from within the range.
For example when running multiple TMs on the same machine, where ports would
otherwise clash. But this complexity is not needed when spawning TMs with
Mesos, because Mesos will always choose and assign a port, which is guarenteed
to be available. Therefore, it's safe to only request a single port for each
configured portKey.
---