mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Meng Zhu <m...@mesosphere.io>
Subject Re: Review Request 69599: Added a new class `ResourceQuantities`.
Date Mon, 31 Dec 2018 05:52:13 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69599/
-----------------------------------------------------------

(Updated Dec. 30, 2018, 9:52 p.m.)


Review request for mesos and Benjamin Mahler.


Repository: mesos


Description
-------

There are many places that we need to express the concept of
resource quantities such as enforcing allocation quantities
in the allocator and set guaranteed resource quantities with quota.
However, the current code usually uses the complex `Resources`
class which is unnecessary and inefficient.

This patch adds a dedicated class `ResourceQuantities` for this
purpose. Underneath, it contains a vector of name and quantity
pairs. All quantities with the same name are merged.

This patch also adds a wrapper class `Quantity` to abstract the
quantity concept. While currently it only holds a `Value::Scalar`
underneath, in the future, we might want to modify it to support
fixed point representation or units.


Diffs (updated)
-----

  src/CMakeLists.txt bde070445b644e15d46c390d1c983caabaa1fec8 
  src/Makefile.am 7a4904a3d67479267087fd2313a263d8218843fa 
  src/common/quantities.hpp PRE-CREATION 
  src/common/quantities.cpp PRE-CREATION 


Diff: https://reviews.apache.org/r/69599/diff/2/

Changes: https://reviews.apache.org/r/69599/diff/1-2/


Testing
-------

make check
Dedicated test in r/69600


Thanks,

Meng Zhu


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