mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jie Yu <yujie....@gmail.com>
Subject Re: Review Request 63511: Introduced ResourceConversion to represent conversion to Resources.
Date Mon, 06 Nov 2017 18:35:10 GMT


> On Nov. 6, 2017, 2:43 p.m., Benjamin Bannier wrote:
> > src/common/resources_utils.cpp
> > Lines 103 (patched)
> > <https://reviews.apache.org/r/63511/diff/1/?file=1879114#file1879114line103>
> >
> >     In what scenario would this actually return a list of conversions? Right now
it returns at most one conversion.
> >     
> >     I'd either make this return a `Try<TResourceConversion>`, or alternatively
take an iterable of `TOfferOperation` (it seems that a non-list, single element version should
be good enough for now, and also be a good building block should we want to work on lists
of operations at some later point).

For `RESERVE/UNRESERVE/CREATE/DESTROY`, it returns a list of conversions (the foreach loop).
I made it this way so that the semantics is exactly the same as it is right now. We might
be able to consolidate all conversions from an operation into a single conversion, but this
is slightly tricky. I'll punt that for now.


- Jie


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


On Nov. 2, 2017, 7:36 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63511/
> -----------------------------------------------------------
> 
> (Updated Nov. 2, 2017, 7:36 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Mahler, Gaston Kleiman, Greg Mann,
Jan Schlicht, Vinod Kone, and Jiang Yan Xu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Currently, we couple offer operations with resource conversions. For
> instance, we have interfaces like `Resources::apply` that takes an
> offer operation. This becomes less ideal because an offer operation
> might not represent a `conversion` anymore with new offer operation
> like `CREATE_VOLUME` being introduced.
> 
> This patch decoupled resource conversions from offer operations.
> `Resources::apply` will now take a `ResourceConversion` object. We
> also provide some helpers to get a `ResourceConversion` from an offer
> operation (if supported).
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 53152b393ec38ca2fc2e2a66c18a29a4418fe59e 
>   include/mesos/v1/resources.hpp 6c2191c044c52607618283891f82401c4861c441 
>   src/common/resources.cpp 914d3e2b1e8fe55ecab9c71643954addd6a81244 
>   src/common/resources_utils.hpp 18e3d9d4baad23669d00542594f5c15a989b7b9e 
>   src/common/resources_utils.cpp e34cd8a3c9046a6f12c12a275a7b3a852b492f4c 
>   src/v1/resources.cpp 58568b8d25cb1402a875d3975d2decb4270d2725 
> 
> 
> Diff: https://reviews.apache.org/r/63511/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


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