singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From WANG Sheng <>
Subject Re: zookeeper API
Date Tue, 23 Jun 2015 03:25:27 GMT
Hi Anh,

You are correct. The start/stop zookeeper service is only required in the
standalone version.
In the distributed version, the zookeeper service is always on and managed
by users themselves.

In this case, before running a singa job, zookeeper need to be initialized
(e.g. clean old data, create missing path).
This initialization phase should only be executed once. In the current
singa architecture, there is no master node,
hence we need an external tool to do the job before launching singa. (We
are planning to implement it next.)

For your request of writing "hostfile" into zookeeper, it could also be
done by the same tool.
Could you write your code as a new file /support/ which we can later
extend to be the tool.

For the zookeeper API, it is included in the ZKClusterRT class in
I will make the create_zk_node a public function for you to use.

By the way, for each commit we need to attach a jira ticket.
Please create a jira ticket according to the guide on singa website. (You
need to create an jira account first)

Best Regards,


On Tue, Jun 23, 2015 at 9:54 AM, Anh Dinh <> wrote:

> Hi guys,
> Currently the standalone version (I followed the Quickstart guide) would
> start Zookeeper service  every time I ran "".
> I assume that on the distributed version, the ZK service will be started
> only once by a master node, and the rest of the cluster will know the ZK
> master address?
> In this case, since I'm writing Mesos support for singa, could I have the
> following API from the SingaZooKeeperService (or any class that implements
> ZK service for Singa)?
> /**
> * create a node with given name and content.
> * the node can be located at $ZK_PREFIX/filename
> */
> static SingaZooKeeperService::create_zk_node(string filename, string
> content);
> I'm using this to write content of the "hostfile" so that all nodes can
> see.
> Anh.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message