> On 六月 21, 2016, 10:36 p.m., Benjamin Mahler wrote: > > include/mesos/resources.hpp, lines 252-256 > > <https://reviews.apache.org/r/48906/diff/1/?file=1423388#file1423388line252> > > > > The Resources abstraction shouldn't need to know anything about scarce > > resources, you can just use the 'filter' function above if you want to > > perform some custom filtering in the caller.
Hi Ben, so you mean that we still need to keep the function of `isNonScarce` here but only remove `nonScarce`? Can you please explain more for why do you think the resourcs abstraction cannot expose anything of `scarce` resources? In my understadnig, I think that we should put `scarce` resources at same level as `revocable`, `reserved` resources etc, all of them can be treated as `different kind of resources types`, so seems putting this function here is reasonable? - Guangya ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/48906/#review138958 ----------------------------------------------------------- On 六月 18, 2016, 1:04 p.m., Guangya Liu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/48906/ > ----------------------------------------------------------- > > (Updated 六月 18, 2016, 1:04 p.m.) > > > Review request for mesos and Benjamin Mahler. > > > Bugs: MESOS-5621 > https://issues.apache.org/jira/browse/MESOS-5621 > > > Repository: mesos > > > Description > ------- > > Added helper function to get non-scarce resources. > > > Diffs > ----- > > include/mesos/resources.hpp a557e97c65194d4aad879fb88d8edefd1c95b8d8 > include/mesos/v1/resources.hpp a5ba8fec4c9c3643646308f75a4b28cefe0b3df3 > src/common/resources.cpp f6ff92b591c15bc8e93fd85e1896349c3a7bb968 > src/tests/resources_tests.cpp dc12bd8f1e2da6972bc8aed598811c55d664036e > src/v1/resources.cpp 8c3f2d1c1529915a59d47fe37bb3fc7a3267079a > > Diff: https://reviews.apache.org/r/48906/diff/ > > > Testing > ------- > > make > make check > > [==========] Running 1 test from 1 test case. > [----------] Global test environment set-up. > [----------] 1 test from ResourcesTest > [ RUN ] ResourcesTest.NonScarce > [ OK ] ResourcesTest.NonScarce (1 ms) > [----------] 1 test from ResourcesTest (1 ms total) > > [----------] Global test environment tear-down > [==========] 1 test from 1 test case ran. (14 ms total) > [ PASSED ] 1 test. > > > Thanks, > > Guangya Liu > >