mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Klaus Ma <klaus1982...@gmail.com>
Subject Re: Review Request 37168: Add an example framework using dynamic reservation.
Date Tue, 05 Apr 2016 04:22:41 GMT


> On April 4, 2016, 9: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."

Thanks very much for your explaintation on `Try`; that's clear to me :).

BTW, `rc` means `return code`.


- Klaus


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


On March 22, 2016, 11:44 a.m., Klaus Ma wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37168/
> -----------------------------------------------------------
> 
> (Updated March 22, 2016, 11:44 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 9dd21b56af0500f7125b07bf535b45fe5c544aaf 
>   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