> On Feb. 13, 2015, 6:09 p.m., Ben Mahler wrote: > > I'm curiuos, why not add a metric for this, instead of adding it to > > state.json? > > Ben Mahler wrote: > The review subject says "stats.json" (which is deprecated in favor of > metrics), but this was added to "state.json" in the diff? > > Alexander Rojas wrote: > The question is where to add it. It is truth the original ticket request > it to be on the `stats.json`, but as nnielsen pointed out, it is more a > description of the server's state and as such it should be on the server. I > will update the description of the review.
It can't go into stats.json because the stats.json endpoints are deprecated in favor of using `Metric`s, which get exposed on `/metrics/snapshot`. Feel free to help us fence it off more clearly in the code! :) What do you mean by "be on the server"? Is stats.json not on the server? I'd like to understand this distinction as "max_allowed_gc_age_secs" seems as equally valid a Metric as "uptime_secs", "recovery_errors", etc. :) - Ben ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/30074/#review72399 ----------------------------------------------------------- On Feb. 14, 2015, 11:20 a.m., Alexander Rojas wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/30074/ > ----------------------------------------------------------- > > (Updated Feb. 14, 2015, 11:20 a.m.) > > > Review request for mesos, Niklas Nielsen and Till Toenshoff. > > > Bugs: mesos-2229 > https://issues.apache.org/jira/browse/mesos-2229 > > > Repository: mesos > > > Description > ------- > > Adds and entry `max_allowed_age_secs` to the response of the `state.json` > endpoint in the slave. > > 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.StateEndpoint` so it takes into account the > new entry. > > > Diffs > ----- > > src/slave/http.cpp 0395d00 > src/slave/slave.hpp 70bd8c1 > src/slave/slave.cpp a8b2621 > src/tests/slave_tests.cpp 956ce64 > > Diff: https://reviews.apache.org/r/30074/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Alexander Rojas > >
