Benjamin Hindman created MESOS-1248:
---------------------------------------

             Summary: Use JSON instead of our own format for passing URI 
information to mesos-fetcher
                 Key: MESOS-1248
                 URL: https://issues.apache.org/jira/browse/MESOS-1248
             Project: Mesos
          Issue Type: Improvement
          Components: slave
            Reporter: Benjamin Hindman


We should just send JSON in the environment variable rather than our own format 
for MESOS_EXECUTOR_URIS. To simplify we might as well send the entire 
CommandInfo rather than pulling out the URIs. This would boil down to just the 
following in the containerizer:

environment["MESOS_COMMAND_INFO"] = stringify(JSON::Protobuf(commandInfo));


And something along the lines of the following in the fetcher:

Try<JSON::Object> parse = 
JSON::parse<JSON::Object>(os::getenv("MESOS_COMMAND_INFO"));

if (parse.isError()) {
  ...
}

Try<CommandInfo> commandInfo = protobuf::parse<CommandInfo>(parse.get());

if (commandInfo.isError()) {
  ...
}

foreach (const CommandInfo::URI& uri, commandInfo.get().uris()) {
  ...
}




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to