mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <bmah...@apache.org>
Subject Re: Review Request 60369: Exposed allocated resources per each role in /state endpoint on agent.
Date Mon, 03 Jul 2017 13:22:54 GMT

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




src/slave/http.cpp
Lines 1330-1334 (patched)
<https://reviews.apache.org/r/60369/#comment254243>

    Whoops, I should have noticed this earlier, but when going to commit this I was taking
a careful look at the code. This isn't accounting for the pending tasks here:
    
    https://github.com/apache/mesos/blob/0d277bb64fa5a4d0b4f741daedf64095beab4773/src/slave/slave.hpp#L904-L905
    
    Unfortunately the logic is a little tricky. We have to include all of the pending task
resources. Also, for each executor in the pending map, we have to add the ExecutorInfo resources
only if it's absent from the 'executors' map. You'll want to do a read through of how the
data structures are used to confirm whether I'm right. :)
    
    My suggestion here would be to have an `allocatedResources()` function within the `Framework`
struct that contains this logic, and here in the http handler we just sum `allocatedResources()`
across the frameworks.


- Benjamin Mahler


On June 29, 2017, 3:23 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60369/
> -----------------------------------------------------------
> 
> (Updated June 29, 2017, 3:23 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
>     https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The JSON key for this information is "reserved_resources_allocated"
> and "unreserved_resources_allocated".
> 
> 
> Diffs
> -----
> 
>   src/slave/http.cpp cbbc1dc27cc90bac8d48cbbc84266c3d87490a3c 
> 
> 
> Diff: https://reviews.apache.org/r/60369/diff/4/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


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