mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Qian Zhang" <zhang...@cn.ibm.com>
Subject Re: Review Request 39401: Quota: Updated allocate() in the hierarchical allocator to support quota.
Date Tue, 27 Oct 2015 07:24:33 GMT


> On Oct. 26, 2015, 4:27 p.m., Qian Zhang wrote:
> > src/master/allocator/mesos/hierarchical.cpp, lines 1017-1020
> > <https://reviews.apache.org/r/39401/diff/5/?file=1105060#file1105060line1017>
> >
> >     Why do we put these code inside the framework sorters foreach loop? I do not
see it is related to framework.
> >     If we really want to put these code here, then I think we also need to recalculate
roleAllocatedResources every time when we allocate some resources to a framework of the role,
and once the quota for the role is satifised, break.
> 
> Alexander Rukletsov wrote:
>     There can be multiple frameworks in a role, hence quota may get satisfied after we
allocate resources to some frameworks.
>     
>     > then I think we also need to recalculate roleAllocatedResources every time when
we allocate some resources to a framework
>     
>     But we do that at the end of the loop, right?

I do not see we recalculate roleAllocatedResources in the frameworkSorters foreach loop, actually
we do that outside of that loop (at the end of the quotaRoleSorter foreach loop), that means,
even we allocate resources to some frameworks in the frameworkSorters foreach loop, the variable
roleAllocatedResources will NOT be recalculated. That's why I suggested to recalculate roleAllocatedResources
every time when we allocate some resources to a framework :-)


> On Oct. 26, 2015, 4:27 p.m., Qian Zhang wrote:
> > src/master/allocator/mesos/hierarchical.cpp, line 996
> > <https://reviews.apache.org/r/39401/diff/5/?file=1105060#file1105060line996>
> >
> >     These newly added code makes allocate() a huge method (more than 200 lines),
maybe move these codes into a separate method?
> 
> Alexander Rukletsov wrote:
>     Absolutely! The reason why it's not done is because we have already planned (but
not yet scheduled) an allocator refactoring. Let me add a `TODO` for now in order to increase
the pressure on ourselves ; ).

Agree :-)


- Qian


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


On Oct. 24, 2015, 12:38 a.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39401/
> -----------------------------------------------------------
> 
> (Updated Oct. 24, 2015, 12:38 a.m.)
> 
> 
> Review request for mesos, Bernd Mathiske, Joerg Schad, and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-3718
>     https://issues.apache.org/jira/browse/MESOS-3718
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp f4e4a123d3da0442e8b0b0ad14d1ee760752ba36

> 
> Diff: https://reviews.apache.org/r/39401/diff/
> 
> 
> Testing
> -------
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>


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