In certain Mesos/DCOS environments, the slave hostnames aren't resolvable. For this and other reasons, Mesos DNS names would ideally be used for communication within the Flink cluster, not the hostname discovered via `InetAddress.getLocalHost`.
Some parts of Flink are already configurable in this respect, notably `jobmanager.rpc.address`. However, the Mesos AppMaster doesn't use that setting for everything (e.g. artifact server), it uses the hostname.
Similarly, the `taskmanager.hostname` setting isn't used in Mesos deployment mode. To effectively use Mesos DNS, the TM should use `<task-name>.<framework-name>.mesos` as its hostname. This could be derived from an interpolated configuration string.