As far as I know, the port will be set to random binding. Yarn actually have the ability to translate the proxy link to the right node/port. If your goal is trying to avoid going through the YARN rest proxy, this could be a problem: There's chances that the host/port will get changed by YARN without a backward notification to Consul (or is there a way I am not sure). This could happen either through YARN's native failure recovery mechanism (2nd attempt) or through HA.
CCed till who might be able to answer more comprehensively regarding this. Thanks, Rong On Wed, Apr 17, 2019 at 7:14 AM Olivier Solliec <o.soll...@criteo.com> wrote: > Hello, > > > I want to be able to register a flink cluster into a service discovery > system (Consul in our case). > > This flink cluster is scheduled on YARN. > > > Is there a way to know which port was assigned to the rest interface ? > > > Via the rest API /jobmanager/config, I see a key "jobmanager.rpc.address" > which is the correct yarn node, but both "rest.port" and "web.port" have > "0" value. > > > The idea is to launch a cluster, retrieve its app id, use the yarn web ui > proxy to get the right node address/port, and register this into Consul. > > > Thank you, > > > Olivier >