singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anh Dinh <ug93...@gmail.com>
Subject Re: zookeeper API
Date Tue, 23 Jun 2015 11:24:55 GMT
Thanks WangSheng,

Should I also assume that the distributed version will read both "hostfile"
and "cluster.conf" file from Zookeeper service? It'd make it easier for
Mesos to manage Singa.

Cheers,
Anh.


On 23 June 2015 at 11:25, WANG Sheng <wangsh@comp.nus.edu.sg> wrote:

> 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/main.cc which we can later
> extend to be the tool.
>
> For the zookeeper API, it is included in the ZKClusterRT class in
> /utils/cluster_rt.h.
> 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,
>
> Sheng
>
>
>
> On Tue, Jun 23, 2015 at 9:54 AM, Anh Dinh <ug93tad@gmail.com> wrote:
>
> > Hi guys,
> >
> > Currently the standalone version (I followed the Quickstart guide) would
> > start Zookeeper service  every time I ran "singa-run.sh".
> >
> > 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.
> >
>

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