[
https://issues.apache.org/jira/browse/MESOS-2467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14353874#comment-14353874
]
Michael Park commented on MESOS-2467:
-------------------------------------
I'm surprised we only support {{JSON::Object}} currently, but I guess we
haven't needed the other ones. It looks like the other flags have the pattern
of: "See the X Protobuf in mesos.proto for the expected format". It seems that
in order to keep consistency we would need a {{Resources}} message:
{code}message Resources { repeated Resource resources; }{code}
which of course would break badly since we already have a {{Resources}} C++
type. Unless there's a sane way to separate those, it totally makes sense to
support JSON array of Resource objects instead and we can say something like,
"See the Resource protobuf in mesos.proto for the expected format of each of
the elements".
> Allow --resources flag to take JSON.
> ------------------------------------
>
> Key: MESOS-2467
> URL: https://issues.apache.org/jira/browse/MESOS-2467
> Project: Mesos
> Issue Type: Improvement
> Reporter: Jie Yu
>
> Currently, we used a customized format for --resources flag. As we introduce
> more and more stuffs (e.g., persistence, reservation) in Resource object, we
> need a more generic way to specify --resources.
> For backward compatibility, we can scan the first character. If it is '[',
> then we invoke the JSON parser. Otherwise, we use the existing parser.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)