Thanks for the information. Forgot to mention, I am using Flink 1.4, the 
RestClusterClient seems don’t have the ability to retrieve the leader address. 
I did notice there is webMonitorRetrievalService member in Flink 1.5.

I wonder if I can use RestClusterClient@v1.5<mailto:RestClusterClient@v1.5> on 
my client side, to retrieve the leader JM of Flink v1.4 Cluster.

Thanks
Youjun

发件人: vino yang <yanghua1...@gmail.com>
发送时间: Wednesday, July 25, 2018 7:11 PM
收件人: Martin Eden <martineden...@gmail.com>
抄送: Yuan,Youjun <yuanyou...@baidu.com>; user@flink.apache.org
主题: Re: Best way to find the current alive jobmanager with HA mode zookeeper

Hi Martin,


For a standalone cluster which exists multiple JM instances, If you do not use 
Rest API, but use Flink provided Cluster client. The client can perceive which 
one this the JM leader from multiple JM instances.

For example, you can use CLI to submit flink job in a non-Leader node.

But I did not verify this case for Flink on Mesos.

Thanks, vino.

2018-07-25 17:22 GMT+08:00 Martin Eden 
<martineden...@gmail.com<mailto:martineden...@gmail.com>>:
Hi,

This is actually very relevant to us as well.

We want to deploy Flink 1.3.2 on a 3 node DCOS cluster. In the case of 
Mesos/DCOS, Flink HA runs only one JobManager which gets restarted on another 
node by Marathon in case of failure and re-load it's state from Zookeeper.

Yuan I am guessing you are using Flink in standalone mode and there it is 
actually running 3 instances of the Job Manager, 1 active and 2 stand-bys.

Either way, in both cases there is the need to "discover" the hostname and port 
of the Job Manager at runtime. This is needed when you want to use the cli to 
submit jobs for instance. Is there an elegant mode to submit jobs other than 
say just trying out all the possible nodes in your cluster?

Grateful if anyone could clarify any of the above, thanks,
M

On Wed, Jul 25, 2018 at 11:37 AM, Yuan,Youjun 
<yuanyou...@baidu.com<mailto:yuanyou...@baidu.com>> wrote:
Hi all,

I have a standalone cluster with 3 jobmanagers, and set high-availability to 
zookeeper. Our client submits job by REST API(POST /jars/:jarid/run), which 
means we need to know the host of the any of the current alive jobmanagers. The 
problem is that, how can we know which job manager is alive, or the host of 
current leader?  We don’t want to access a dead JM.

Thanks.
Youjun Yuan


Reply via email to