[
https://issues.apache.org/jira/browse/MESOS-2340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14555194#comment-14555194
]
Yan Xu edited comment on MESOS-2340 at 5/21/15 10:50 PM:
---------------------------------------------------------
[~marco-mesos] Since the scheduler only needs to discover the *already elected*
leading master. Does the following sound simpler?
Add the logic in {{master.cpp}} and have the *leading master* publish a
_mirroring_ and _ephemeral_ JSON in a separate {{discovery}} ZooKeeper group
using {{Group.join()}}, after it has determined that it's has become the new
leader.
- The sequence ID of the leading master in the {{discovery}} group doesn't even
need to match the one in {{election}} group. Since both ephemeral, they are
removed at the same time.
- No change necessary in Group, which doesn't know about ProtoBuf/JSON but only
sees a {{string}}.
- Master knows the definition of MasterInfo ProtoBuf so it's easy to convert it
to JSON.
- The scheduler watches the {{discovery}} group and picks the ZNode with the
lowest sequence number as the leading master. However I think there should
actually be <= 1 member is that group.
- {{election}} and {{discovery}} are logically separated and the {{discovery}}
group can even be on a different ZK cluster or a different type of service.
was (Author: xujyan):
[~marco-mesos] Since the scheduler only needs to discover the *already elected*
leading master. Does the following sound simpler?
Add the logic in {{master.cpp}} and have the *leading master* publish a
_mirroring_ and _ephemeral_ JSON in a separate {{discovery}} ZooKeeper group
using {{Group.join()}}, after it has determined that it's has become new leader.
- The sequence ID of the leading master in the {{discovery}} group doesn't even
need to match the one in {{election}} group. Since both ephemeral, they are
removed at the same time.
- No change necessary in Group, which doesn't know about ProtoBuf/JSON but only
sees a {{string}}.
- Master knows the definition of MasterInfo ProtoBuf so it's easy to convert it
to JSON.
- The scheduler watches the {{discovery}} group and picks the ZNode with the
lowest sequence number as the leading master. However I think there should
actually be <= 1 member is that group.
- {{election}} and {{discovery}} are logically separated and they can even be
on a different ZK cluster or a different service.
> Publish JSON in ZK instead of serialized MasterInfo
> ---------------------------------------------------
>
> Key: MESOS-2340
> URL: https://issues.apache.org/jira/browse/MESOS-2340
> Project: Mesos
> Issue Type: Improvement
> Reporter: Zameer Manji
> Assignee: haosdent
>
> Currently to discover the master a client needs the ZK node location and
> access to the MasterInfo protobuf so it can deserialize the binary blob in
> the node.
> I think it would be nice to publish JSON (like Twitter's ServerSets) so
> clients are not tied to protobuf to do service discovery.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)