You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Chun-Hung Hsiao <ch...@mesosphere.io> on 2017/12/21 03:41:15 UTC

Re: Review Request 64754: Removed `kilobytes()`, `megabytes()`, etc from `Bytes`.

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

(Updated Dec. 21, 2017, 3:41 a.m.)


Review request for mesos, Benjamin Bannier, Benjamin Mahler, Jie Yu, and Vinod Kone.


Changes
-------

Addressed Ben's comment: killing the helpers.


Summary (updated)
-----------------

Removed `kilobytes()`, `megabytes()`, etc from `Bytes`.


Repository: mesos


Description (updated)
-------

These functios are removed because they are lossy. The unit conversion
for `Resource` should be explicit. For example:
  `resource.scalar().set_value(size.bytes() * 1.0 / Bytes::MEGABYTES)`


Diffs (updated)
-----

  3rdparty/stout/include/stout/bytes.hpp cbe953662bb86c2f1eef3453f557ea17c0c6d13e 


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

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


Testing
-------

See later in chain.


Thanks,

Chun-Hung Hsiao


Re: Review Request 64754: Removed `kilobytes()`, `megabytes()`, etc from `Bytes`.

Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/64754/#review194346
-----------------------------------------------------------


Fix it, then Ship it!





3rdparty/stout/include/stout/bytes.hpp
Lines 145 (patched)
<https://reviews.apache.org/r/64754/#comment273109>

    Do you need this?


- Jie Yu


On Dec. 21, 2017, 3:41 a.m., Chun-Hung Hsiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64754/
> -----------------------------------------------------------
> 
> (Updated Dec. 21, 2017, 3:41 a.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Mahler, Jie Yu, and Vinod Kone.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> These functios are removed because they are lossy. The unit conversion
> for `Resource` should be explicit. For example:
>   `resource.scalar().set_value((double) size.bytes() / Bytes::MEGABYTES)`
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/bytes.hpp cbe953662bb86c2f1eef3453f557ea17c0c6d13e 
> 
> 
> Diff: https://reviews.apache.org/r/64754/diff/2/
> 
> 
> Testing
> -------
> 
> See later in chain.
> 
> 
> Thanks,
> 
> Chun-Hung Hsiao
> 
>