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



src/master/allocator/mesos/hierarchical.cpp (lines 1291 - 1319)
<https://reviews.apache.org/r/40632/#comment175675>

    None of this should be necessary:
    
    1) You should have all the allocation slack inside `available`.
    2) We don't have allocation slack ACLs in the MVP, so all allocation slack 
should fall under `available.unreserved`.  If we do have ACLs, some of the 
allocation slack will be accounted for in `available.reserved(role)`.
    3) You shouldn't need to recalculate this during `::allocate`.
    
    If any of the above are not true, you probably have a problem in the 
`Resource` helpers or in `::addSlave`.



src/master/allocator/mesos/hierarchical.cpp (lines 1337 - 1340)
<https://reviews.apache.org/r/40632/#comment175676>

    Suggestion:
    Quota does not affect revocable resources.  If the non-revocable component 
of this offer would exceed quota, the revocable portion can still be offered.



src/master/allocator/mesos/hierarchical.cpp (lines 1341 - 1346)
<https://reviews.apache.org/r/40632/#comment175677>

    This should be something resembling:
    ```
    Resources revocable = resources.revocable();
    if (revocable.empty()) {
      continue;
    } else {
      // Offer just the revocable resources.
      resources = revocable;
    }
    ```



src/tests/hierarchical_allocator_tests.cpp (lines 146 - 155)
<https://reviews.apache.org/r/40632/#comment175678>

    This change should probably go in the previous review.



src/tests/hierarchical_allocator_tests.cpp (line 993)
<https://reviews.apache.org/r/40632/#comment175679>

    Can you pull this out into an entirely separate (not part of this review 
chain) review?
    
    We can get the test cleanup merged faster.
    Ditto for below.



src/tests/hierarchical_allocator_tests.cpp (line 1009)
<https://reviews.apache.org/r/40632/#comment175680>

    Test cleanup -> separate review.



src/tests/hierarchical_allocator_tests.cpp (line 1101)
<https://reviews.apache.org/r/40632/#comment175681>

    Test cleanup -> separate review.



src/tests/hierarchical_allocator_tests.cpp (line 2067)
<https://reviews.apache.org/r/40632/#comment175682>

    Test cleanup -> separate review.


- Joseph Wu


On Jan. 13, 2016, 4:39 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40632/
> -----------------------------------------------------------
> 
> (Updated Jan. 13, 2016, 4:39 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van 
> Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
> 
> 
> Bugs: MESOS-4145
>     https://issues.apache.org/jira/browse/MESOS-4145
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enabled oversubscribed resources for reservations in allocator.
> 
> There are five patches handling the allocator part:
> 1) This patch handles send offer, add slave and quota integration test.
> 2) https://reviews.apache.org/r/41847/ Handles the case of update slave.
> 3) https://reviews.apache.org/r/41791/ Handles the case of dynamic 
> reservations (1/3).
> 4) https://reviews.apache.org/r/42113/ Handle unreserve logic for dynamic 
> reservation (2/3)
> 5) https://reviews.apache.org/r/42194/ Handle unreserve logic for dynamic 
> reservation (3/3)
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp 
> d541bfa3f4190865c65d35c9d1ffdb8a3f194056 
>   src/tests/hierarchical_allocator_tests.cpp 
> e044f832c2c16e53e663c6ced5452649bb0dcb59 
> 
> Diff: https://reviews.apache.org/r/40632/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> GLOG_v=2 ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" 
> --verbose
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>

Reply via email to