This is an automatically generated e-mail. To reply, visit:

(Updated May 22, 2016, 7:08 a.m.)

Review request for mesos, Benjamin Mahler, Joris Van Remoortere, and Jiang Yan 


Changes based on `ShareInfo` renamed to `SharedInfo`.
Cleaned up the `Resources` and `Resource_` classes.
Share count keeps track of shared resource utilization in usedResources, but it 
keeps track of whether shared resource is used or not in offer, allocator and 

Bugs: MESOS-4892

Repository: mesos

Description (updated)

A new class Resource_ is added that allows 'Resources' to group
identical shared resource objects together into a single 'Resource_'
object and tracked by its shared count. Non-shared resource objects
are not grouped.

For resource addition and subtraction, the shared count is adjusted for
shared resources as follows:
a) Addition: If shared resource is absent from original, then the
   resource is added initialized with a consumer count of 1. Otherwise,
   the share count for the shared resource is incremented.
b) Subtraction: If shared resource's share count is already 1, then
   the shared resource is removed from the original. Otherwise, its
   consumer count is decremented.

Diffs (updated)

  include/mesos/resources.hpp a557e97c65194d4aad879fb88d8edefd1c95b8d8 
  include/mesos/v1/resources.hpp a5ba8fec4c9c3643646308f75a4b28cefe0b3df3 
  src/common/resources.cpp f6ff92b591c15bc8e93fd85e1896349c3a7bb968 
  src/master/validation.cpp f490b899758bdac9676a6f6939918efa6ac52781 
  src/tests/mesos.hpp 79bf1ff16412ce2a510a9b75ab1ac91c1c182653 
  src/tests/resources_tests.cpp dc12bd8f1e2da6972bc8aed598811c55d664036e 
  src/v1/resources.cpp 8c3f2d1c1529915a59d47fe37bb3fc7a3267079a 

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


New tests added to demonstrate arithmetic operations for shared resources with 
consumer counts.
Tests successful.


Anindya Sinha

Reply via email to