Re: Review Request 42992: Support sharing of resources through reference counting of resources.

2016-02-13 Thread Anindya Sinha

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

(Updated Feb. 14, 2016, 6:24 a.m.)


Review request for mesos and Adam B.


Bugs: MESOS-4431
https://issues.apache.org/jira/browse/MESOS-4431


Repository: mesos


Description (updated)
---

Shareable resources keeps track of its consumers and makes decision based on
that during task launch and task termination.
Allow DESTROY or UNSHARE for shared volumes only if reference count is 0.


Diffs (updated)
-

  include/mesos/resources.hpp fe8a5745ea7d4943c47ac22c73db70488c6dfa9f 
  include/mesos/v1/resources.hpp c27927e4f0d7f45e69fe3312b2423afb64c5c51e 
  src/common/resources.cpp 5d731870542166cec11f9956ccdf16207b2d22cc 
  src/common/resources_utils.cpp 70e6f025d89383084ab8b2cda23ab1cd55d959b2 
  src/master/allocator/mesos/hierarchical.cpp 
a9d2c23162892e0f97d89a076d2311091d91 
  src/master/allocator/sorter/drf/sorter.cpp 
18797e42a9c2bd20392020237cfae600a5ffe12c 
  src/master/master.hpp 2f2ad2ada508e1923bf995ab124367a3b082b572 
  src/master/master.cpp e1ca81dab85a7ab1391eca0d6bd995548bf79c22 
  src/master/validation.hpp 380b40279faf180a6f401a5e28280b601dbc648c 
  src/master/validation.cpp 66898e914c7b4ab83c4580be67530f355cfb05ca 
  src/v1/resources.cpp 207eb61d6a6d03d314539d42751cac65fcffa9af 

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


Testing
---

make check done.


Thanks,

Anindya Sinha



Re: Review Request 42992: Support sharing of resources through reference counting of resources.

2016-02-13 Thread Anindya Sinha


> On Feb. 13, 2016, 12:57 a.m., Greg Mann wrote:
> > include/mesos/resources.hpp, line 222
> > 
> >
> > I might recommend renaming this method, due to the ubiquitous `get()` 
> > method of the `Future` and `Option` types. Perhaps `find()` instead?

There is a method `Option find(const Resources& targets) const;` 
which does different from what this function does. This method extracts the 
Resource object from Resources that matches the passed in Resource& by not 
comparing the num_consumers.
So, let us rename this to:
`Option locate(const Resource& that) const;`

Does it sound ok to you?


> On Feb. 13, 2016, 12:57 a.m., Greg Mann wrote:
> > include/mesos/mesos.proto, lines 988-989
> > 
> >
> > I'm curious if we'll really need these operations? Might it be enough 
> > to simply make a persistent volume shareable when it's created? The same 
> > might be the case for other shareable resources as well.

I think that supporting SHARE as add-on operations for resources that can be 
shared (but are not created as shared) is useful. Same argument for UNSHARE.
Keeping in mind that this feature is for sharing resources (not just sharing of 
persistent volumes), I feel that these 2 apis have a need to co-exist.


> On Feb. 13, 2016, 12:57 a.m., Greg Mann wrote:
> > include/mesos/mesos.proto, line 688
> > 
> >
> > I don't think this field belongs in the protobuf. If this information 
> > doesn't need to be communicated on the wire, the master can simply track it 
> > internally, and reconstruct it upon agent reregistration after master 
> > failover.

As stated in the design doc, this has been done to make implementation simpler. 
Resource is used quite extensively in code and hence it was easier to embed 
num_consumers in it.
I agree we can keep num_consumers as a hashmap, such as:
`hashmap consumers;` and expose it in a singleton or 
something like that such that multiple classes can have access to it, esp. the 
sorter, allocator and master.
However, the num_consumers vary based on its context. For example:
i) For role, it contains the total tasks within a specific role that master has 
assigned this resource. This is across frameworks.
ii) For framework, it contains the total tasks within a specific framework that 
master has assigned this resource.
iii) For slave, it contains the total tasks within a slave that master has 
assigned this resource (this should be same as (i) for persistent volumes).
etc...
So we would need to maintain multiple hashmaps to reflect this. Secondly, there 
needs to be a `hashmap::find` for every access to num_consumers which can be 
avoided if we embed it within Resource::ShareInfo.

Another point that has been raised is if we should reconsider and actually 
expose `num_consumerss` to frameworks since that would give a good idea for 
frameworks to know when a `DESTROY` can be issued. Note that the `DESTROY` is 
not guaranteed to succeed though since another framework of the same role might 
have issued a launch task using this resource in the mantime (and that is the 
reason we did not expose this in the first place). However, I think we can 
consider exposing this to frameworks if we feel that would provide frameworks 
with some meaningful information regarding possibility of DESTROY being 
successful. Note that the same issue exists with non-shareable persistent 
volumes as well, but the use case is not as bad since there can be only 1 task 
that can use the persistent volume.


- Anindya


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


On Feb. 5, 2016, 10:57 p.m., Anindya Sinha wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42992/
> ---
> 
> (Updated Feb. 5, 2016, 10:57 p.m.)
> 
> 
> Review request for mesos and Adam B.
> 
> 
> Bugs: MESOS-4431
> https://issues.apache.org/jira/browse/MESOS-4431
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added new Offer::Operation of SHARE and UNSHARE for resources.
> Added ShareInfo within Resources protobuf to allow for sharing of resources
> and keep track of consumers of such resources.
> Shareable resources keeps track of its consumers and makes decision based on
> that during task launch and task termination.
> Allow DESTROY or UNSHARE for shared volumes only if reference count is 0.
> 
> 
> Diffs
> -
> 
>   include/mesos/mesos.proto 5d1a20b4ff647f43701a353472b56a4b74b6bbc3 
>   include/mesos/resources.hpp 6bfac2e7e8799e74d87c757

Re: Review Request 42992: Support sharing of resources through reference counting of resources.

2016-02-12 Thread Greg Mann

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




include/mesos/mesos.proto (line 688)


I don't think this field belongs in the protobuf. If this information 
doesn't need to be communicated on the wire, the master can simply track it 
internally, and reconstruct it upon agent reregistration after master failover.



include/mesos/mesos.proto (lines 988 - 989)


I'm curious if we'll really need these operations? Might it be enough to 
simply make a persistent volume shareable when it's created? The same might be 
the case for other shareable resources as well.



include/mesos/resources.hpp (line 222)


I might recommend renaming this method, due to the ubiquitous `get()` 
method of the `Future` and `Option` types. Perhaps `find()` instead?


- Greg Mann


On Feb. 5, 2016, 10:57 p.m., Anindya Sinha wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42992/
> ---
> 
> (Updated Feb. 5, 2016, 10:57 p.m.)
> 
> 
> Review request for mesos and Adam B.
> 
> 
> Bugs: MESOS-4431
> https://issues.apache.org/jira/browse/MESOS-4431
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added new Offer::Operation of SHARE and UNSHARE for resources.
> Added ShareInfo within Resources protobuf to allow for sharing of resources
> and keep track of consumers of such resources.
> Shareable resources keeps track of its consumers and makes decision based on
> that during task launch and task termination.
> Allow DESTROY or UNSHARE for shared volumes only if reference count is 0.
> 
> 
> Diffs
> -
> 
>   include/mesos/mesos.proto 5d1a20b4ff647f43701a353472b56a4b74b6bbc3 
>   include/mesos/resources.hpp 6bfac2e7e8799e74d87c7570fc5eef320ba76eb1 
>   include/mesos/v1/mesos.proto 415a20d9f3385e9627635dd89d78c58d03e3c116 
>   include/mesos/v1/resources.hpp 5a88c0756db2ea8db0f5df7ea3019b511ea135af 
>   src/common/resources.cpp 588a279c3cdebbeb58047bfbff5e78a42f53fc13 
>   src/common/resources_utils.cpp 70e6f025d89383084ab8b2cda23ab1cd55d959b2 
>   src/master/allocator/mesos/hierarchical.cpp 
> a9d2c23162892e0f97d89a076d2311091d91 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 18797e42a9c2bd20392020237cfae600a5ffe12c 
>   src/master/master.hpp 3a7e18232323a1c051bcc97915484b1195fffe58 
>   src/master/master.cpp e1ca81dab85a7ab1391eca0d6bd995548bf79c22 
>   src/master/validation.hpp 380b40279faf180a6f401a5e28280b601dbc648c 
>   src/master/validation.cpp 66898e914c7b4ab83c4580be67530f355cfb05ca 
>   src/v1/resources.cpp be4a5d153e9313cb71a6e85d1ed25a358537f2b7 
> 
> Diff: https://reviews.apache.org/r/42992/diff/
> 
> 
> Testing
> ---
> 
> make check done.
> 
> 
> Thanks,
> 
> Anindya Sinha
> 
>



Re: Review Request 42992: Support sharing of resources through reference counting of resources.

2016-02-11 Thread Anindya Sinha


> On Feb. 11, 2016, 3:14 p.m., Guangya Liu wrote:
> > src/common/resources.cpp, lines 202-205
> > 
> >
> > Does this require that the num_consumers should be same?

No. This just checks that we are comparing 2 resources that both have share set 
(for shareable resources), or niether have share set (for regular non-shareable 
resources). It does not mandate num_consumers to be equal.


> On Feb. 11, 2016, 3:14 p.m., Guangya Liu wrote:
> > src/common/resources.cpp, lines 335-338
> > 
> >
> > does this require the num_consumers be same when subtract?

No.  This just checks that we are comparing 2 resources that both have share 
set (for shareable resources), or niether have share set (for regular 
non-shareable resources). It does not mandate num_consumers to be equal.


- Anindya


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


On Feb. 5, 2016, 10:57 p.m., Anindya Sinha wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42992/
> ---
> 
> (Updated Feb. 5, 2016, 10:57 p.m.)
> 
> 
> Review request for mesos and Adam B.
> 
> 
> Bugs: MESOS-4431
> https://issues.apache.org/jira/browse/MESOS-4431
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added new Offer::Operation of SHARE and UNSHARE for resources.
> Added ShareInfo within Resources protobuf to allow for sharing of resources
> and keep track of consumers of such resources.
> Shareable resources keeps track of its consumers and makes decision based on
> that during task launch and task termination.
> Allow DESTROY or UNSHARE for shared volumes only if reference count is 0.
> 
> 
> Diffs
> -
> 
>   include/mesos/mesos.proto 5d1a20b4ff647f43701a353472b56a4b74b6bbc3 
>   include/mesos/resources.hpp 6bfac2e7e8799e74d87c7570fc5eef320ba76eb1 
>   include/mesos/v1/mesos.proto 415a20d9f3385e9627635dd89d78c58d03e3c116 
>   include/mesos/v1/resources.hpp 5a88c0756db2ea8db0f5df7ea3019b511ea135af 
>   src/common/resources.cpp 588a279c3cdebbeb58047bfbff5e78a42f53fc13 
>   src/common/resources_utils.cpp 70e6f025d89383084ab8b2cda23ab1cd55d959b2 
>   src/master/allocator/mesos/hierarchical.cpp 
> a9d2c23162892e0f97d89a076d2311091d91 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 18797e42a9c2bd20392020237cfae600a5ffe12c 
>   src/master/master.hpp 3a7e18232323a1c051bcc97915484b1195fffe58 
>   src/master/master.cpp e1ca81dab85a7ab1391eca0d6bd995548bf79c22 
>   src/master/validation.hpp 380b40279faf180a6f401a5e28280b601dbc648c 
>   src/master/validation.cpp 66898e914c7b4ab83c4580be67530f355cfb05ca 
>   src/v1/resources.cpp be4a5d153e9313cb71a6e85d1ed25a358537f2b7 
> 
> Diff: https://reviews.apache.org/r/42992/diff/
> 
> 
> Testing
> ---
> 
> make check done.
> 
> 
> Thanks,
> 
> Anindya Sinha
> 
>



Re: Review Request 42992: Support sharing of resources through reference counting of resources.

2016-02-11 Thread Guangya Liu

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




src/common/resources.cpp (lines 202 - 205)


Does this require that the num_consumers should be same?



src/common/resources.cpp (lines 335 - 338)


does this require the num_consumers be same when subtract?



src/common/resources.cpp (line 729)


add a period to the end.



src/common/resources.cpp (line 734)


s/Resource type/Resoure

`Resource type` is usally specifying if the resources is `SCALAR`, `SET` or 
`RANGES`.



src/common/resources.cpp (lines 1653 - 1656)


Can you please add some comments to clarify the difference between `None` 
and `0` for `num_consumers`?


- Guangya Liu


On 二月 5, 2016, 10:57 p.m., Anindya Sinha wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42992/
> ---
> 
> (Updated 二月 5, 2016, 10:57 p.m.)
> 
> 
> Review request for mesos and Adam B.
> 
> 
> Bugs: MESOS-4431
> https://issues.apache.org/jira/browse/MESOS-4431
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added new Offer::Operation of SHARE and UNSHARE for resources.
> Added ShareInfo within Resources protobuf to allow for sharing of resources
> and keep track of consumers of such resources.
> Shareable resources keeps track of its consumers and makes decision based on
> that during task launch and task termination.
> Allow DESTROY or UNSHARE for shared volumes only if reference count is 0.
> 
> 
> Diffs
> -
> 
>   include/mesos/mesos.proto 5d1a20b4ff647f43701a353472b56a4b74b6bbc3 
>   include/mesos/resources.hpp 6bfac2e7e8799e74d87c7570fc5eef320ba76eb1 
>   include/mesos/v1/mesos.proto 415a20d9f3385e9627635dd89d78c58d03e3c116 
>   include/mesos/v1/resources.hpp 5a88c0756db2ea8db0f5df7ea3019b511ea135af 
>   src/common/resources.cpp 588a279c3cdebbeb58047bfbff5e78a42f53fc13 
>   src/common/resources_utils.cpp 70e6f025d89383084ab8b2cda23ab1cd55d959b2 
>   src/master/allocator/mesos/hierarchical.cpp 
> a9d2c23162892e0f97d89a076d2311091d91 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 18797e42a9c2bd20392020237cfae600a5ffe12c 
>   src/master/master.hpp 3a7e18232323a1c051bcc97915484b1195fffe58 
>   src/master/master.cpp e1ca81dab85a7ab1391eca0d6bd995548bf79c22 
>   src/master/validation.hpp 380b40279faf180a6f401a5e28280b601dbc648c 
>   src/master/validation.cpp 66898e914c7b4ab83c4580be67530f355cfb05ca 
>   src/v1/resources.cpp be4a5d153e9313cb71a6e85d1ed25a358537f2b7 
> 
> Diff: https://reviews.apache.org/r/42992/diff/
> 
> 
> Testing
> ---
> 
> make check done.
> 
> 
> Thanks,
> 
> Anindya Sinha
> 
>



Re: Review Request 42992: Support sharing of resources through reference counting of resources.

2016-02-05 Thread Anindya Sinha

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

(Updated Feb. 5, 2016, 10:57 p.m.)


Review request for mesos and Adam B.


Bugs: MESOS-4431
https://issues.apache.org/jira/browse/MESOS-4431


Repository: mesos


Description
---

Added new Offer::Operation of SHARE and UNSHARE for resources.
Added ShareInfo within Resources protobuf to allow for sharing of resources
and keep track of consumers of such resources.
Shareable resources keeps track of its consumers and makes decision based on
that during task launch and task termination.
Allow DESTROY or UNSHARE for shared volumes only if reference count is 0.


Diffs (updated)
-

  include/mesos/mesos.proto 5d1a20b4ff647f43701a353472b56a4b74b6bbc3 
  include/mesos/resources.hpp 6bfac2e7e8799e74d87c7570fc5eef320ba76eb1 
  include/mesos/v1/mesos.proto 415a20d9f3385e9627635dd89d78c58d03e3c116 
  include/mesos/v1/resources.hpp 5a88c0756db2ea8db0f5df7ea3019b511ea135af 
  src/common/resources.cpp 588a279c3cdebbeb58047bfbff5e78a42f53fc13 
  src/common/resources_utils.cpp 70e6f025d89383084ab8b2cda23ab1cd55d959b2 
  src/master/allocator/mesos/hierarchical.cpp 
a9d2c23162892e0f97d89a076d2311091d91 
  src/master/allocator/sorter/drf/sorter.cpp 
18797e42a9c2bd20392020237cfae600a5ffe12c 
  src/master/master.hpp 3a7e18232323a1c051bcc97915484b1195fffe58 
  src/master/master.cpp e1ca81dab85a7ab1391eca0d6bd995548bf79c22 
  src/master/validation.hpp 380b40279faf180a6f401a5e28280b601dbc648c 
  src/master/validation.cpp 66898e914c7b4ab83c4580be67530f355cfb05ca 
  src/v1/resources.cpp be4a5d153e9313cb71a6e85d1ed25a358537f2b7 

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


Testing
---

make check done.


Thanks,

Anindya Sinha



Re: Review Request 42992: Support sharing of resources through reference counting of resources.

2016-02-01 Thread Anindya Sinha


> On Jan. 30, 2016, 4:02 a.m., Guangya Liu wrote:
> > src/common/resources.cpp, line 899
> > 
> >
> > Do we also need to check contain here?
> > 
> > I think that the unsharable should be failed if the current resoures 
> > does not contain the unshared resources.

No, since the passed Resource "that" needs to have share=true. If that is not 
the case, it is not a shared resource and hence cannot be unshared. If "that" 
is a shared resource, then it falls through to the call to 
`_getExistingConsumers(that)` where the logic for num_consumers==0 is done.


> On Jan. 30, 2016, 4:02 a.m., Guangya Liu wrote:
> > src/common/resources.cpp, line 1134
> > 
> >
> > Here not checking "if the volume exists" but "if the volume is a subset 
> > of current resources"

In `destroyable()`, check for `contains()` is done for non shareable resources. 
For shareable resources, we do a similar check in `_getExistingConsumers()` but 
extract the resource to ensure its num_consumers==0.
I think it covers both scenarios. Am I missing something?


> On Jan. 30, 2016, 4:02 a.m., Guangya Liu wrote:
> > src/common/resources.cpp, lines 1652-1654
> > 
> >
> > I think that we already set the num consumers as 0 when initialize, so 
> > when the logic can go here?
> > 
> > What is the difference of {None} and {0} here?

{None} is when num_consumers is not set, and 0 is when num_consumers is set to 
0. We do not send or expect to receive num_consumers for shareable resources in 
Resources for all messages going between master <-> framework. This condition 
handles the scenario when Resource is logged at these points when num_consumers 
is not set. An example is when we log the offer received while running all our 
test frameworks.


> On Jan. 30, 2016, 4:02 a.m., Guangya Liu wrote:
> > src/common/resources_utils.cpp, lines 71-73
> > 
> >
> > Do we need to move this under 68 under `isPersistentVolume` condition 
> > section?

We can but I think it is fine here as well, especially because shareable 
resources are supported for all resource types but enabled for persistent 
volumes right now. Except the check in `Option Resources::validate(const 
Resource& resource)`, I do not think there are any references to assert that 
only persistent volumes can be shared.
Also in future, when we do extend sharing of resources to other resource tyoes 
as well, we should be good to go here.


- Anindya


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


On Feb. 2, 2016, 12:36 a.m., Anindya Sinha wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42992/
> ---
> 
> (Updated Feb. 2, 2016, 12:36 a.m.)
> 
> 
> Review request for mesos and Adam B.
> 
> 
> Bugs: MESOS-4431
> https://issues.apache.org/jira/browse/MESOS-4431
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added new Offer::Operation of SHARE and UNSHARE for resources.
> Added ShareInfo within Resources protobuf to allow for sharing of resources
> and keep track of consumers of such resources.
> Shareable resources keeps track of its consumers and makes decision based on
> that during task launch and task termination.
> Allow DESTROY or UNSHARE for shared volumes only if reference count is 0.
> 
> 
> Diffs
> -
> 
>   include/mesos/mesos.proto 194750e92020753e60154083a47bdc3398d31466 
>   include/mesos/resources.hpp 6bfac2e7e8799e74d87c7570fc5eef320ba76eb1 
>   include/mesos/v1/mesos.proto 1102bbc92f46f97c1915c03a71c7cf829003e0ed 
>   include/mesos/v1/resources.hpp 5a88c0756db2ea8db0f5df7ea3019b511ea135af 
>   src/common/resources.cpp 588a279c3cdebbeb58047bfbff5e78a42f53fc13 
>   src/common/resources_utils.cpp 70e6f025d89383084ab8b2cda23ab1cd55d959b2 
>   src/master/allocator/mesos/hierarchical.cpp 
> 1a07d69016407e5aad2209586da37fecbcddb765 
>   src/master/allocator/sorter/drf/sorter.cpp 
> db47d640e36c0302d7c6254a9c58caa878feac01 
>   src/master/master.hpp 3a7e18232323a1c051bcc97915484b1195fffe58 
>   src/master/master.cpp 98441a543611d4083b2495ee103f0ab5e2187e83 
>   src/master/validation.hpp 380b40279faf180a6f401a5e28280b601dbc648c 
>   src/master/validation.cpp f2bc1bad79e3b0812c019be3774cd65b58ea2d07 
>   src/v1/resources.cpp be4a5d153e9313cb71a6e85d1ed25a358537f2b7 
> 
> Diff: https://reviews.apache.org/r/42992/diff/
> 
> 
> Testing
> ---
> 
> make check done.
> 
> 
> Thanks,
> 
> Anindya Si

Re: Review Request 42992: Support sharing of resources through reference counting of resources.

2016-02-01 Thread Anindya Sinha


> On Feb. 1, 2016, 3:46 a.m., Guangya Liu wrote:
> > src/master/master.cpp, lines 5444-5445
> > 
> >
> > move this comments to 5452

To avoid rebase issues, I will fix this as a part of 
`https://reviews.apache.org/r/42997/`.


- Anindya


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


On Feb. 2, 2016, 12:36 a.m., Anindya Sinha wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42992/
> ---
> 
> (Updated Feb. 2, 2016, 12:36 a.m.)
> 
> 
> Review request for mesos and Adam B.
> 
> 
> Bugs: MESOS-4431
> https://issues.apache.org/jira/browse/MESOS-4431
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added new Offer::Operation of SHARE and UNSHARE for resources.
> Added ShareInfo within Resources protobuf to allow for sharing of resources
> and keep track of consumers of such resources.
> Shareable resources keeps track of its consumers and makes decision based on
> that during task launch and task termination.
> Allow DESTROY or UNSHARE for shared volumes only if reference count is 0.
> 
> 
> Diffs
> -
> 
>   include/mesos/mesos.proto 194750e92020753e60154083a47bdc3398d31466 
>   include/mesos/resources.hpp 6bfac2e7e8799e74d87c7570fc5eef320ba76eb1 
>   include/mesos/v1/mesos.proto 1102bbc92f46f97c1915c03a71c7cf829003e0ed 
>   include/mesos/v1/resources.hpp 5a88c0756db2ea8db0f5df7ea3019b511ea135af 
>   src/common/resources.cpp 588a279c3cdebbeb58047bfbff5e78a42f53fc13 
>   src/common/resources_utils.cpp 70e6f025d89383084ab8b2cda23ab1cd55d959b2 
>   src/master/allocator/mesos/hierarchical.cpp 
> 1a07d69016407e5aad2209586da37fecbcddb765 
>   src/master/allocator/sorter/drf/sorter.cpp 
> db47d640e36c0302d7c6254a9c58caa878feac01 
>   src/master/master.hpp 3a7e18232323a1c051bcc97915484b1195fffe58 
>   src/master/master.cpp 98441a543611d4083b2495ee103f0ab5e2187e83 
>   src/master/validation.hpp 380b40279faf180a6f401a5e28280b601dbc648c 
>   src/master/validation.cpp f2bc1bad79e3b0812c019be3774cd65b58ea2d07 
>   src/v1/resources.cpp be4a5d153e9313cb71a6e85d1ed25a358537f2b7 
> 
> Diff: https://reviews.apache.org/r/42992/diff/
> 
> 
> Testing
> ---
> 
> make check done.
> 
> 
> Thanks,
> 
> Anindya Sinha
> 
>



Re: Review Request 42992: Support sharing of resources through reference counting of resources.

2016-02-01 Thread Anindya Sinha

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

(Updated Feb. 2, 2016, 12:36 a.m.)


Review request for mesos and Adam B.


Summary (updated)
-

Support sharing of resources through reference counting of resources.


Bugs: MESOS-4431
https://issues.apache.org/jira/browse/MESOS-4431


Repository: mesos


Description (updated)
---

Added new Offer::Operation of SHARE and UNSHARE for resources.
Added ShareInfo within Resources protobuf to allow for sharing of resources
and keep track of consumers of such resources.
Shareable resources keeps track of its consumers and makes decision based on
that during task launch and task termination.
Allow DESTROY or UNSHARE for shared volumes only if reference count is 0.


Diffs (updated)
-

  include/mesos/mesos.proto 194750e92020753e60154083a47bdc3398d31466 
  include/mesos/resources.hpp 6bfac2e7e8799e74d87c7570fc5eef320ba76eb1 
  include/mesos/v1/mesos.proto 1102bbc92f46f97c1915c03a71c7cf829003e0ed 
  include/mesos/v1/resources.hpp 5a88c0756db2ea8db0f5df7ea3019b511ea135af 
  src/common/resources.cpp 588a279c3cdebbeb58047bfbff5e78a42f53fc13 
  src/common/resources_utils.cpp 70e6f025d89383084ab8b2cda23ab1cd55d959b2 
  src/master/allocator/mesos/hierarchical.cpp 
1a07d69016407e5aad2209586da37fecbcddb765 
  src/master/allocator/sorter/drf/sorter.cpp 
db47d640e36c0302d7c6254a9c58caa878feac01 
  src/master/master.hpp 3a7e18232323a1c051bcc97915484b1195fffe58 
  src/master/master.cpp 98441a543611d4083b2495ee103f0ab5e2187e83 
  src/master/validation.hpp 380b40279faf180a6f401a5e28280b601dbc648c 
  src/master/validation.cpp f2bc1bad79e3b0812c019be3774cd65b58ea2d07 
  src/v1/resources.cpp be4a5d153e9313cb71a6e85d1ed25a358537f2b7 

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


Testing
---

make check done.


Thanks,

Anindya Sinha