Search code examples
apache-zookeepermesosmesosphere

How to get the IP of current leader master from the quorum?


Is there any way to get the IP of current leading Mesos-master from the quorum? Does any variable stores that value?


Solution

  • yes. Master information stored in zk as json format. You could get the leader master from zk. Please refer to this article http://codetrips.com/2015/08/16/apache-mesos-leader-master-discovery-using-zookeeper-part-2/ to see how to get it. Macro is the author of add Mesos master json format to zk. You could use the libray https://github.com/massenz/zk-mesos to get leader maste from zk directly.