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


Thanks for submitting this Alexander!
I have a few questions/suggestions below :)


src/slave/http.cpp
<https://reviews.apache.org/r/30074/#comment114961>

    Why stats and not state.json?



src/slave/http.cpp
<https://reviews.apache.org/r/30074/#comment114967>

    We should think about how to get the fact in, that it integer is a number 
of seconds.
    
    How about something like:
    
    max_allowed_directory_age_seconds = 42
    or
    max_allowed_directory_seconds = 42
    
    ?



src/slave/slave.hpp
<https://reviews.apache.org/r/30074/#comment114960>

    We can make this a bit more precise. It is not just any files, but the 
executor directories/sandboxes.
    
    How about having something like:
    // Maximum age of executor directories. Will be recomputed periodically 
every flags.disk_watch_interval.



src/slave/slave.cpp
<https://reviews.apache.org/r/30074/#comment114966>

    You don't have to initialize Option types with None. They will 
automatically be that :)



src/slave/slave.cpp
<https://reviews.apache.org/r/30074/#comment114955>

    You don't need to use some() here. You can just set the value:
    
    maxAllowedAge = age(usage.get());



src/tests/slave_tests.cpp
<https://reviews.apache.org/r/30074/#comment114964>

    Instead of setting this low (which would still cause a 1s+ test). How about 
forwarding the clock with flags.disk_watch_interval? That should trigger the 
timeout immediately


- Niklas Nielsen


On Jan. 21, 2015, 5:55 a.m., Alexander Rojas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30074/
> -----------------------------------------------------------
> 
> (Updated Jan. 21, 2015, 5:55 a.m.)
> 
> 
> Review request for mesos, Niklas Nielsen and Till Toenshoff.
> 
> 
> Bugs: mesos-2229
>     https://issues.apache.org/jira/browse/mesos-2229
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Adds and entry `max_allowed_age` to the response of the stats.json endpoint 
> in the slave. The format of the value is `{double}(days|mins|secs)`.
> 
> The max allowed age value is available only if it is set, which depends on 
> the flag `--disk_watch_interval` which by default runs every minute (So it 
> will only be available after the first minute running).
> 
> Modifies the unit test `SlaveTest.MetricsInStatsEndpoint` so it takes into 
> account the new entry.
> 
> 
> Diffs
> -----
> 
>   src/slave/http.cpp d1cf8a6 
>   src/slave/slave.hpp 70bd8c1 
>   src/slave/slave.cpp fca83b3 
>   src/tests/slave_tests.cpp a85a028 
> 
> Diff: https://reviews.apache.org/r/30074/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Alexander Rojas
> 
>

Reply via email to