[ 
https://issues.apache.org/jira/browse/MESOS-2340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14564506#comment-14564506
 ] 

Benjamin Hindman commented on MESOS-2340:
-----------------------------------------

Hmm, I'm not sure I understand what needs to get plumbed through? From the 
existing MasterDetector's perspective we'll just add another if case (in 
src/master/detector.cpp):

if (label.isNone()) {
  ...
} else if (label.isSome() && label.get() == master::MASTER_INFO_JSON_LABEL) {
  ... parse data as JSON MasterInfo ...
}

We'll ship that with 0.23.0 as you recommended. From the MasterContender 
perspective we'll just change the data and label that we pass to the ZooKeeper 
LeaderContender (in src/master/contender.cpp):

contender = new LeaderContender(group.get(), data, 
master::MASTER_INFO_JSON_LABEL);

Where 'data' above is JSON. We'll ship that in 0.24.0. And from any new 
"detectors" that don't use MasterDetector they can just read directly from 
ZooKeeper and decide what to do. If they get:

/path/to/znode/info_0000000131

Then they know to parse it at protobuf, but if they get:

/path/to/znode/info-json_0000000131

Then they can parse it as JSON. This is how we did the last deprecation cycle 
as well.

> 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: Marco Massenzio
>
> 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)

Reply via email to