mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anindya Sinha <>
Subject Re: Review Request 51999: Refactor parsing of resources.
Date Wed, 21 Sep 2016 04:14:06 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Sept. 21, 2016, 4:14 a.m.)

Review request for mesos and Jiang Yan Xu.


Updated based on review comments.

Summary (updated)

Refactor parsing of resources.

Bugs: MESOS-6062

Repository: mesos

Description (updated)

Refactored `Resources::parse()` into 2 separate static functions:
1. Resources::fromJSONString() to parse JSON representation of
2. Resources::fromSimpleString() to parse text representation of

Since these 2 new functions return a `Try<vector<Resource>>`, the
existing `Resources::parse()` implicitly converts that to a
`Resources` object. This refactor is done to retrieve all resources
(include empty resources) required for auto detection of root
and MOUNT disks.

Diffs (updated)

  include/mesos/resources.hpp 3ef8cacee529addc745b4aeb6398d7606c61b749 
  include/mesos/v1/resources.hpp ef56b4960b103a3efd916fab64796aa334ba44c6 
  src/common/resources.cpp 4602bff22ec7ff77f069056085ad92bfa04595f3 
  src/tests/resources_tests.cpp 3e493007d6d1d8194d07035aaa1cde28dedf2b5a 
  src/v1/resources.cpp 7c4db44d4c31a8295cc16b0ce1ef5adf314e6ac6 


Testing (updated)

All tests passed.


Anindya Sinha

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