You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Jie Yu <yu...@gmail.com> on 2014/08/06 02:16:48 UTC

Re: Review Request 24124: Added a slave metric for exposing the number of active containers.

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

(Updated Aug. 6, 2014, 12:16 a.m.)


Review request for mesos, Ben Mahler, Dominic Hamon, and Ian Downes.


Changes
-------

BenM's comment. Expose executors metrics instead.

active containers = executors in REGISTERING, RUNNING, TERMINATING states.


Repository: mesos-git


Description
-------

See summary.


Diffs (updated)
-----

  src/slave/slave.hpp c12cd0a 
  src/slave/slave.cpp c56cac8 
  src/tests/slave_tests.cpp 3a7fee6 

Diff: https://reviews.apache.org/r/24124/diff/


Testing
-------

make check


Thanks,

Jie Yu


Re: Review Request 24124: Added a slave metric for exposing the number of active containers.

Posted by Dominic Hamon <dh...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/24124/#review49744
-----------------------------------------------------------

Ship it!



src/slave/slave.cpp
<https://reviews.apache.org/r/24124/#comment87052>

    you could simplify this with:
    
    double Slave::count_executors_in_state(ExecutorState state) const {
      double count = 0.0;
      foreachvalue (Framework* framework, frameworks) {
        foreachvalue (Executor* executor, framework->executors) {
          if (executor->state == state) {
            count++;
          }
        }
      }
      return count;
    }
    


- Dominic Hamon


On Aug. 5, 2014, 5:16 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/24124/
> -----------------------------------------------------------
> 
> (Updated Aug. 5, 2014, 5:16 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Dominic Hamon, and Ian Downes.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.hpp c12cd0a 
>   src/slave/slave.cpp c56cac8 
>   src/tests/slave_tests.cpp 3a7fee6 
> 
> Diff: https://reviews.apache.org/r/24124/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>