mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominic Hamon" <dha...@twopensource.com>
Subject Re: Review Request 30459: Refactored task/offer/resource valiation in master.
Date Sat, 31 Jan 2015 02:10:45 GMT


> On Jan. 30, 2015, 4:48 p.m., Ben Mahler wrote:
> > Thanks for following up on the cleanup!
> > 
> > Looks much better! Some higher level feedback per our chat:
> > 
> > (1) Can we make this header more minimal by moving out everything except `validation::task::validate(...)`
and `validation::offer::validate(...)`. There's a few reasons to motivate this, first is that
this makes it easier to read this header and understand what the caller (master) should care
about (right now it's a bit tough to come in to this header and "grok" it). Also, the other
helpers still have a bit of dependencies between them (e.g. `validateResourceUsage` assumes
the `ExecutorInfo` is valid) so we might want to avoid anyone calling these just yet :). If
we want to test these, we can move them back to the header but hide them below the caller's
API with a NOTE that they are exposed for testing :)
> > 
> > (2) Right now this calls every validator even if the previous validators fail. That's
different from the existing semantics and it's unnecessary work. Could we use lambda::bind
per our chat to avoid this?

i thought the same for 1) but they need to be there for tests in the future. given how that's
coming soon (right?) the churn to remove and add them seems unnecessary.

for 2, is it a better experience to run all the validators and append the errors?


- Dominic


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


On Jan. 30, 2015, 6:09 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30459/
> -----------------------------------------------------------
> 
> (Updated Jan. 30, 2015, 6:09 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Dominic Hamon, and Vinod Kone.
> 
> 
> Bugs: MESOS-2305
>     https://issues.apache.org/jira/browse/MESOS-2305
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Refactored task/offer/resource valiation in master.
> 
> See ticket for motivation.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 07bea1fb8f0035413f2119859e16fa4f9383f68e 
>   src/master/master.hpp 337e00aa46ea127f3667e3383d631c3fb8e22f30 
>   src/master/master.cpp 10056861b95ed9453c971787982db7d09f09f323 
>   src/master/validation.hpp PRE-CREATION 
>   src/master/validation.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/30459/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


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