Re: Review Request 40375: [WIP] Support distinguishing revocable resources in the Resource protobuf.

2015-11-24 Thread Guangya Liu

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



include/mesos/mesos.proto (line 649)


Did you get out how to leverage this default value in the code? ;-)



src/common/resources.cpp (lines 92 - 93)


// To keep backward compatibility, resources without revocable type are 
considered same as resources with USAGE_SLACK type.



src/common/resources.cpp (lines 94 - 95)


bool operator==(
const Resource::RevocableInfo& left,
const Resource::RevocableInfo& right)



src/common/resources.cpp (lines 115 - 116)


bool operator!=(
const Resource::RevocableInfo& left,
const Resource::RevocableInfo& right)



src/tests/resources_tests.cpp (line 800)


Do we need to update this? The standard revocable resource should be usage 
slack



src/tests/resources_tests.cpp (lines 1908 - 1909)


new line



src/tests/resources_tests.cpp (lines 1912 - 1913)


new line



src/tests/resources_tests.cpp (lines 1941 - 1948)


new line to split.

It is suggested to add new line if one sentense is split to two lines.



src/tests/resources_tests.cpp (line 1982)


EXPECT_TRUE((r3 - r3).empty());



src/tests/resources_tests.cpp (line 1986)


Add EXPECT_TRUE((r5 - r5).empty());



src/v1/resources.cpp (lines 93 - 105)


update this to handle backward compatibility issue



src/v1/resources.cpp (lines 1365 - 1368)


Losing no type case


- Guangya Liu


On 十一月 24, 2015, 7:24 a.m., Klaus Ma wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40375/
> ---
> 
> (Updated 十一月 24, 2015, 7:24 a.m.)
> 
> 
> Review request for mesos, Guangya Liu, Artem Harutyunyan, and Joris Van 
> Remoortere.
> 
> 
> Bugs: MESOS-3888
> https://issues.apache.org/jira/browse/MESOS-3888
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> MESOS-3888: We need to distinguish revocable resource for usage slack and 
> allocation slack.
> 
> 
> Diffs
> -
> 
>   include/mesos/mesos.proto 0b8289f 
>   include/mesos/v1/mesos.proto c98f2a4 
>   src/common/resources.cpp b4abf54 
>   src/tests/resources_tests.cpp dbd39cd 
>   src/v1/resources.cpp 8488c31 
> 
> Diff: https://reviews.apache.org/r/40375/diff/
> 
> 
> Testing
> ---
> 
> make && make check
> 
> 
> Thanks,
> 
> Klaus Ma
> 
>



Re: Review Request 40375: [WIP] Support distinguishing revocable resources in the Resource protobuf.

2015-11-24 Thread Klaus Ma


> On Nov. 24, 2015, 4:26 p.m., Guangya Liu wrote:
> > src/tests/resources_tests.cpp, line 1982
> > 
> >
> > EXPECT_TRUE((r3 - r3).empty());

This is added the previous code, so i'd like to drop this issue.


> On Nov. 24, 2015, 4:26 p.m., Guangya Liu wrote:
> > src/tests/resources_tests.cpp, line 1986
> > 
> >
> > Add EXPECT_TRUE((r5 - r5).empty());

ditto


> On Nov. 24, 2015, 4:26 p.m., Guangya Liu wrote:
> > src/tests/resources_tests.cpp, lines 1941-1948
> > 
> >
> > new line to split.
> > 
> > It is suggested to add new line if one sentense is split to two lines.

I keep the same style with other code in `resources_test.cpp`, so i'd like to 
keep it as is.


> On Nov. 24, 2015, 4:26 p.m., Guangya Liu wrote:
> > include/mesos/mesos.proto, line 649
> > 
> >
> > Did you get out how to leverage this default value in the code? ;-)

Did not try it, but I think calling `mutable_type()` (or similar) will set the 
type. `mutable_revocable()` will only create revocable object instead of 
RevocableInfo::type.


> On Nov. 24, 2015, 4:26 p.m., Guangya Liu wrote:
> > src/tests/resources_tests.cpp, line 800
> > 
> >
> > Do we need to update this? The standard revocable resource should be 
> > usage slack

I mean unset RevocableInfo::type; maybe `Unset RevocableInfo::type revocable 
resource` is better.


- Klaus


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


On Nov. 24, 2015, 3:24 p.m., Klaus Ma wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40375/
> ---
> 
> (Updated Nov. 24, 2015, 3:24 p.m.)
> 
> 
> Review request for mesos, Guangya Liu, Artem Harutyunyan, and Joris Van 
> Remoortere.
> 
> 
> Bugs: MESOS-3888
> https://issues.apache.org/jira/browse/MESOS-3888
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> MESOS-3888: We need to distinguish revocable resource for usage slack and 
> allocation slack.
> 
> 
> Diffs
> -
> 
>   include/mesos/mesos.proto 0b8289f 
>   include/mesos/v1/mesos.proto c98f2a4 
>   src/common/resources.cpp b4abf54 
>   src/tests/resources_tests.cpp dbd39cd 
>   src/v1/resources.cpp 8488c31 
> 
> Diff: https://reviews.apache.org/r/40375/diff/
> 
> 
> Testing
> ---
> 
> make && make check
> 
> 
> Thanks,
> 
> Klaus Ma
> 
>



Re: Review Request 40375: [WIP] Support distinguishing revocable resources in the Resource protobuf.

2015-11-24 Thread Klaus Ma

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

(Updated Nov. 24, 2015, 7:35 p.m.)


Review request for mesos, Guangya Liu, Artem Harutyunyan, and Joris Van 
Remoortere.


Changes
---

Address comments.


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


Repository: mesos


Description
---

MESOS-3888: We need to distinguish revocable resource for usage slack and 
allocation slack.


Diffs (updated)
-

  include/mesos/mesos.proto 0b8289f 
  include/mesos/v1/mesos.proto c98f2a4 
  src/common/resources.cpp b4abf54 
  src/tests/resources_tests.cpp dbd39cd 
  src/v1/resources.cpp 8488c31 

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


Testing
---

make && make check


Thanks,

Klaus Ma



Re: Review Request 40375: [WIP] Support distinguishing revocable resources in the Resource protobuf.

2015-11-23 Thread Klaus Ma

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

(Updated Nov. 24, 2015, 3:24 p.m.)


Review request for mesos, Guangya Liu, Artem Harutyunyan, and Joris Van 
Remoortere.


Changes
---

Keep the compatibility of unset RevocableInfo::type & RevocableInfo::USAGE_SLACK


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


Repository: mesos


Description
---

MESOS-3888: We need to distinguish revocable resource for usage slack and 
allocation slack.


Diffs (updated)
-

  include/mesos/mesos.proto 0b8289f 
  include/mesos/v1/mesos.proto c98f2a4 
  src/common/resources.cpp b4abf54 
  src/tests/resources_tests.cpp dbd39cd 
  src/v1/resources.cpp 8488c31 

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


Testing
---

make && make check


Thanks,

Klaus Ma



Re: Review Request 40375: [WIP] Support distinguishing revocable resources in the Resource protobuf.

2015-11-22 Thread Guangya Liu

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



include/mesos/mesos.proto (line 643)


s/oversubscription/oversubscription for allocations



include/mesos/mesos.proto (line 647)


The project name may need update to ""oversubscription for reservations"



src/tests/resources_tests.cpp (line 802)


s/Standard/USAGE_SLACK



src/tests/resources_tests.cpp (lines 804 - 805)


one line



src/tests/resources_tests.cpp (lines 812 - 813)


one line



src/tests/resources_tests.cpp (line 1899)


new line



src/tests/resources_tests.cpp (line 1929)


new line



src/tests/resources_tests.cpp (line 1931)


new line



src/tests/resources_tests.cpp (line 1933)


new line



src/tests/resources_tests.cpp (line 1937)


I think we can still use "sum" here



src/tests/resources_tests.cpp (line 1961)


s/revocable/USAGE_SLACK revocable


- Guangya Liu


On 十一月 21, 2015, 3:47 a.m., Klaus Ma wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40375/
> ---
> 
> (Updated 十一月 21, 2015, 3:47 a.m.)
> 
> 
> Review request for mesos, Guangya Liu, Artem Harutyunyan, and Joris Van 
> Remoortere.
> 
> 
> Bugs: MESOS-3888
> https://issues.apache.org/jira/browse/MESOS-3888
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> MESOS-3888: We need to distinguish revocable resource for usage slack and 
> allocation slack.
> 
> 
> Diffs
> -
> 
>   include/mesos/mesos.proto 5ad48bd 
>   include/mesos/v1/mesos.proto e71ddda 
>   src/common/resources.cpp f1da323 
>   src/tests/resources_tests.cpp 0d084fd 
>   src/v1/resources.cpp 6f50101 
> 
> Diff: https://reviews.apache.org/r/40375/diff/
> 
> 
> Testing
> ---
> 
> make && make check
> 
> 
> Thanks,
> 
> Klaus Ma
> 
>



Re: Review Request 40375: [WIP] Support distinguishing revocable resources in the Resource protobuf.

2015-11-22 Thread Guangya Liu

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



src/common/resources.cpp (lines 94 - 106)


For compatibility issue, shall we take no_type same as USAGE_SLACK?


- Guangya Liu


On 十一月 21, 2015, 3:47 a.m., Klaus Ma wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40375/
> ---
> 
> (Updated 十一月 21, 2015, 3:47 a.m.)
> 
> 
> Review request for mesos, Guangya Liu, Artem Harutyunyan, and Joris Van 
> Remoortere.
> 
> 
> Bugs: MESOS-3888
> https://issues.apache.org/jira/browse/MESOS-3888
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> MESOS-3888: We need to distinguish revocable resource for usage slack and 
> allocation slack.
> 
> 
> Diffs
> -
> 
>   include/mesos/mesos.proto 5ad48bd 
>   include/mesos/v1/mesos.proto e71ddda 
>   src/common/resources.cpp f1da323 
>   src/tests/resources_tests.cpp 0d084fd 
>   src/v1/resources.cpp 6f50101 
> 
> Diff: https://reviews.apache.org/r/40375/diff/
> 
> 
> Testing
> ---
> 
> make && make check
> 
> 
> Thanks,
> 
> Klaus Ma
> 
>



Re: Review Request 40375: [WIP] Support distinguishing revocable resources in the Resource protobuf.

2015-11-20 Thread Klaus Ma

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

(Updated Nov. 21, 2015, 11:47 a.m.)


Review request for mesos, Guangya Liu, Artem Harutyunyan, and Joris Van 
Remoortere.


Changes
---

Address comments


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


Repository: mesos


Description
---

MESOS-3888: We need to distinguish revocable resource for usage slack and 
allocation slack.


Diffs (updated)
-

  include/mesos/mesos.proto 5ad48bd 
  include/mesos/v1/mesos.proto e71ddda 
  src/common/resources.cpp f1da323 
  src/tests/resources_tests.cpp 0d084fd 
  src/v1/resources.cpp 6f50101 

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


Testing
---

make && make check


Thanks,

Klaus Ma



Re: Review Request 40375: [WIP] Support distinguishing revocable resources in the Resource protobuf.

2015-11-18 Thread Qian Zhang

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


Do we also need to add this support in v1/mesos.proto?

- Qian Zhang


On Nov. 18, 2015, 2:58 p.m., Klaus Ma wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40375/
> ---
> 
> (Updated Nov. 18, 2015, 2:58 p.m.)
> 
> 
> Review request for mesos, Guangya Liu, Artem Harutyunyan, and Joris Van 
> Remoortere.
> 
> 
> Bugs: MESOS-3888
> https://issues.apache.org/jira/browse/MESOS-3888
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> MESOS-3888: We need to distinguish revocable resource for usage slack and 
> allocation slack.
> 
> 
> Diffs
> -
> 
>   include/mesos/mesos.proto 5ad48bd 
> 
> Diff: https://reviews.apache.org/r/40375/diff/
> 
> 
> Testing
> ---
> 
> make && make check
> 
> 
> Thanks,
> 
> Klaus Ma
> 
>



Re: Review Request 40375: [WIP] Support distinguishing revocable resources in the Resource protobuf.

2015-11-17 Thread Klaus Ma

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

(Updated Nov. 18, 2015, 2:58 p.m.)


Review request for mesos, Guangya Liu, Artem Harutyunyan, and Joris Van 
Remoortere.


Changes
---

Working on resources.cpp & UT


Summary (updated)
-

[WIP] Support distinguishing revocable resources in the Resource protobuf.


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


Repository: mesos


Description
---

MESOS-3888: We need to distinguish revocable resource for usage slack and 
allocation slack.


Diffs
-

  include/mesos/mesos.proto 5ad48bd 

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


Testing
---

make && make check


Thanks,

Klaus Ma