mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Park <mp...@apache.org>
Subject Re: Review Request 37168: Add an example framework using dynamic reservation.
Date Wed, 06 Apr 2016 05:55:29 GMT


> On April 4, 2016, 1:40 a.m., Michael Park wrote:
> > src/examples/dynamic_reservation_framework.cpp, lines 311-320
> > <https://reviews.apache.org/r/37168/diff/15/?file=1309849#file1309849line311>
> >
> >     Conceptutally, `Try` is not something we pass around like this. A function returning
a `Try` is emulating a function that throws an exception. So if a `Try` results in an error,
we need to handle it immediately, or propagate the error. We do not pass it along to a subsequent
function.
> >     
> >     There are other issues here as well. Even if we were to pass it around, it should
have been passed by `const &`. What does `rc` stand for?
> >     
> >     Functionally speaking, this says that if `rc` is an error, we log saying we
failed to update the state of an agent. But `reserveResources` returns `Error` if the offer
doesn't contain sufficient amount of resources. This has really little to do with "failing
to update the state of an agent."
> 
> Klaus Ma wrote:
>     Thanks very much for your explaintation on `Try`; that's clear to me :).
>     
>     BTW, `rc` means `return code`.

I see. Thanks.


> On April 4, 2016, 1:40 a.m., Michael Park wrote:
> > src/examples/dynamic_reservation_framework.cpp, lines 350-364
> > <https://reviews.apache.org/r/37168/diff/15/?file=1309849#file1309849line350>
> >
> >     We should be able to just use the ones in `src/tests/mesos.hpp`.
> 
> Klaus Ma wrote:
>     I'd like to de-couple example from Mesos internal code, e.g. `tests/mesos.hpp`. Ideally,
the user can build example with installed Mesos binaries & headers.

I see. Ok, we can keep these then. Thanks!


- Michael


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


On April 5, 2016, 9:28 a.m., Klaus Ma wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37168/
> -----------------------------------------------------------
> 
> (Updated April 5, 2016, 9:28 a.m.)
> 
> 
> Review request for mesos, Greg Mann, Joerg Schad, and Michael Park.
> 
> 
> Bugs: MESOS-3063
>     https://issues.apache.org/jira/browse/MESOS-3063
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Provide example for dynamic reservation features.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am f22ae5b3bd9336a56c802e0e51d39d6cb675caf2 
>   src/examples/dynamic_reservation_framework.cpp PRE-CREATION 
>   src/tests/dynamic_reservation_framework_test.sh PRE-CREATION 
>   src/tests/examples_tests.cpp 6ddac17bb2ac0330bcc09eaab975ae70e84a7695 
> 
> Diff: https://reviews.apache.org/r/37168/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Klaus Ma
> 
>


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