Re: Review Request 61189: Added authorization for V1 events.

2017-08-28 Thread Quinn Leng


> On 八月 23, 2017, 12:29 a.m., Greg Mann wrote:
> > src/tests/api_tests.cpp
> > Lines 2214 (patched)
> > <https://reviews.apache.org/r/61189/diff/5/?file=1800370#file1800370line2214>
> >
> > Since you don't modify these flags at all, you can get rid of this. If 
> > you start the master without a flags parameter, it will use the flags 
> > produced by `CreateMasterFlags()` by default.

This masterFlags because we are using the "masterFlags.allocation_interval" in 
later section.


> On 八月 23, 2017, 12:29 a.m., Greg Mann wrote:
> > src/tests/api_tests.cpp
> > Lines  (patched)
> > <https://reviews.apache.org/r/61189/diff/5/?file=1800370#file1800370line>
> >
> > Can you move this down where you register the `connected` expectation 
> > on the scheduler?

I don't quite understand it, this is pretty close to the connected expectation, 
why we need to move it?


- Quinn


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


On 八月 19, 2017, 3:33 a.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61189/
> ---
> 
> (Updated 八月 19, 2017, 3:33 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Alexander Rojas, and Greg Mann.
> 
> 
> Bugs: MESOS-7785
> https://issues.apache.org/jira/browse/MESOS-7785
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added authorization filtering for the V1 operator events on the
> master, the subscriber should only receive events that are
> authorized based on their principal and ACLs. Since the authorizer
> is called for every event emitted on the stream, the change of
> authorization rule will affect events that the subscribers can
> receive.
> 
> 
> Diffs
> -
> 
>   src/master/http.cpp b09a9d0ab5fab179d0e400932dce7d3ca958d7a8 
>   src/master/master.hpp d9cfc42646c874661e4ec79322126d93a2caf604 
>   src/master/master.cpp 7f38a5e21884546d4b4c866ca5918db779af8f99 
>   src/tests/api_tests.cpp 34480ea6818c904c64cb678562866f0b43dae0d6 
> 
> 
> Diff: https://reviews.apache.org/r/61189/diff/5/
> 
> 
> Testing
> ---
> 
> make check
> GLOG_v=2 ./bin/mesos-tests.sh 
> --gtest_filter="ContentType/MasterAPITest.EventsAuthorizationFiltering*" 
> --verbose --gtest_repeat=100 --gtest_break_on_failure
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Re: Review Request 61189: Added authorization for V1 events.

2017-08-28 Thread Quinn Leng


> On 八月 16, 2017, 9:21 a.m., Alexander Rojas wrote:
> > Can you also update the summary to mention that it only affects the 
> > `SUBSCRIBE` event.

The authorization filtering does affect othre events. And I have updated the 
summary to make it more specific, thanks.


- Quinn


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


On 八月 19, 2017, 3:33 a.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61189/
> ---
> 
> (Updated 八月 19, 2017, 3:33 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Alexander Rojas, and Greg Mann.
> 
> 
> Bugs: MESOS-7785
> https://issues.apache.org/jira/browse/MESOS-7785
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added authorization filtering for the V1 operator events on the
> master, the subscriber should only receive events that are
> authorized based on their principal and ACLs. Since the authorizer
> is called for every event emitted on the stream, the change of
> authorization rule will affect events that the subscribers can
> receive.
> 
> 
> Diffs
> -
> 
>   src/master/http.cpp b09a9d0ab5fab179d0e400932dce7d3ca958d7a8 
>   src/master/master.hpp d9cfc42646c874661e4ec79322126d93a2caf604 
>   src/master/master.cpp 7f38a5e21884546d4b4c866ca5918db779af8f99 
>   src/tests/api_tests.cpp 34480ea6818c904c64cb678562866f0b43dae0d6 
> 
> 
> Diff: https://reviews.apache.org/r/61189/diff/5/
> 
> 
> Testing
> ---
> 
> make check
> GLOG_v=2 ./bin/mesos-tests.sh 
> --gtest_filter="ContentType/MasterAPITest.EventsAuthorizationFiltering*" 
> --verbose --gtest_repeat=100 --gtest_break_on_failure
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Re: Review Request 61189: Added authorization for V1 events.

2017-08-18 Thread Quinn Leng

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

(Updated Aug. 19, 2017, 3:33 a.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, and Greg Mann.


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


Repository: mesos


Description
---

Added authorization filtering for the V1 operator events on the
master, the subscriber should only receive events that are
authorized based on their principal and ACLs. Since the authorizer
is called for every event emitted on the stream, the change of
authorization rule will affect events that the subscribers can
receive.


Diffs (updated)
-

  src/master/http.cpp b09a9d0ab5fab179d0e400932dce7d3ca958d7a8 
  src/master/master.hpp d9cfc42646c874661e4ec79322126d93a2caf604 
  src/master/master.cpp 7f38a5e21884546d4b4c866ca5918db779af8f99 
  src/tests/api_tests.cpp 34480ea6818c904c64cb678562866f0b43dae0d6 


Diff: https://reviews.apache.org/r/61189/diff/5/

Changes: https://reviews.apache.org/r/61189/diff/4-5/


Testing
---

make check
GLOG_v=2 ./bin/mesos-tests.sh 
--gtest_filter="ContentType/MasterAPITest.EventsAuthorizationFiltering*" 
--verbose --gtest_repeat=100 --gtest_break_on_failure


Thanks,

Quinn Leng



Re: Review Request 61763: Added heartbeat interval for V1 Operator API.

2017-08-18 Thread Quinn Leng

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

(Updated Aug. 18, 2017, 11:40 p.m.)


Review request for mesos, Anand Mazumdar and Greg Mann.


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


Repository: mesos


Description
---

Added the heartbeat interval parameter to the SUBSCRIBED event for
V1 operator API. Updated the heartbeat test case to check the
heartbeat interval.


Diffs (updated)
-

  include/mesos/master/master.proto 7dc5881b843addc2ec59fadb45f31049c7e5a588 
  include/mesos/v1/master/master.proto db19c5ccc8aca78f901e72f3caf6d46761270bdd 
  src/master/http.cpp b09a9d0ab5fab179d0e400932dce7d3ca958d7a8 
  src/tests/api_tests.cpp 34480ea6818c904c64cb678562866f0b43dae0d6 


Diff: https://reviews.apache.org/r/61763/diff/2/

Changes: https://reviews.apache.org/r/61763/diff/1-2/


Testing
---

make check


Thanks,

Quinn Leng



Review Request 61763: Added heartbeat interval for V1 Operator API.

2017-08-18 Thread Quinn Leng

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

Review request for mesos, Anand Mazumdar and Greg Mann.


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


Repository: mesos


Description
---

Added the heartbeat interval parameter to the SUBSCRIBED event for
V1 operator API. Updated the heartbeat test case to check the
heartbeat interval.


Diffs
-

  include/mesos/master/master.proto 7dc5881b843addc2ec59fadb45f31049c7e5a588 
  include/mesos/v1/master/master.proto db19c5ccc8aca78f901e72f3caf6d46761270bdd 
  src/master/http.cpp b09a9d0ab5fab179d0e400932dce7d3ca958d7a8 
  src/tests/api_tests.cpp 34480ea6818c904c64cb678562866f0b43dae0d6 


Diff: https://reviews.apache.org/r/61763/diff/1/


Testing
---

make check


Thanks,

Quinn Leng



Review Request 61759: Updated the docs for V1 HEARTBEAT Event.

2017-08-18 Thread Quinn Leng

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

Review request for mesos, Anand Mazumdar and Greg Mann.


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


Repository: mesos


Description
---

Updated the docs for V1 HEARTBEAT Event.


Diffs
-

  docs/operator-http-api.md c56f3b567b07b73602d6cbd7666fc2a31b2475c9 


Diff: https://reviews.apache.org/r/61759/diff/1/


Testing
---


Thanks,

Quinn Leng



Re: Review Request 61189: Added authorization for V1 events.

2017-08-18 Thread Quinn Leng

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

(Updated Aug. 18, 2017, 9:53 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, and Greg Mann.


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


Repository: mesos


Description
---

Added authorization filtering for the V1 operator events on the
master, the subscriber should only receive events that are
authorized based on their principal and ACLs. Since the authorizer
is called for every event emitted on the stream, the change of
authorization rule will affect events that the subscribers can
receive.


Diffs (updated)
-

  src/master/http.cpp 959091c8ec03b6ac7bcb5d21b04d2f7d5aff7d54 
  src/master/master.hpp b802fd153a10f6012cea381f153c28cc78cae995 
  src/master/master.cpp 7f38a5e21884546d4b4c866ca5918db779af8f99 
  src/tests/api_tests.cpp 3ab4740bcac29ecb89585da6adb1f563d6fc1f5f 


Diff: https://reviews.apache.org/r/61189/diff/4/

Changes: https://reviews.apache.org/r/61189/diff/3-4/


Testing
---

make check
GLOG_v=2 ./bin/mesos-tests.sh 
--gtest_filter="ContentType/MasterAPITest.EventsAuthorizationFiltering*" 
--verbose --gtest_repeat=100 --gtest_break_on_failure


Thanks,

Quinn Leng



Re: Review Request 61262: Added 'heartbeat' event for the operator API.

2017-08-18 Thread Quinn Leng

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

(Updated Aug. 18, 2017, 6:54 p.m.)


Review request for mesos, Anand Mazumdar and Greg Mann.


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


Repository: mesos


Description
---

Added the 'HEARTBEAT' event for the operator API, modified other
related test cases to accept heartbeats.


Diffs (updated)
-

  include/mesos/master/master.proto fc5bd894ce55fe8e946d4c5b4b33d3c0505f3c2b 
  include/mesos/v1/master/master.proto c3fb31de2509adcdec8204f8bbe46b46a31540e8 
  src/master/http.cpp 959091c8ec03b6ac7bcb5d21b04d2f7d5aff7d54 
  src/master/master.hpp b802fd153a10f6012cea381f153c28cc78cae995 
  src/tests/api_tests.cpp 3ab4740bcac29ecb89585da6adb1f563d6fc1f5f 


Diff: https://reviews.apache.org/r/61262/diff/8/

Changes: https://reviews.apache.org/r/61262/diff/7-8/


Testing
---

make check -j48


Thanks,

Quinn Leng



Re: Review Request 61189: Added authorization for V1 events.

2017-08-18 Thread Quinn Leng


> On Aug. 8, 2017, 9:36 a.m., Alexander Rojas wrote:
> > src/master/master.cpp
> > Lines 9547-9569 (patched)
> > <https://reviews.apache.org/r/61189/diff/2/?file=1785310#file1785310line9547>
> >
> > I don't think this part should be done as it is. Consider the case when 
> > you have an `Acceptor` which uses a security module which connects to LDAP 
> > for ACLs.
> > 
> > There is a delay for each request you make. It would be wasteful to 
> > create an Acceptor which you will later not use.

After discussion in the #ship-mesos-api-filter channel, we decide to keep the 
logic. Thus the authorizer is called for every events emitted by the stream.


> On Aug. 8, 2017, 9:36 a.m., Alexander Rojas wrote:
> > src/master/master.cpp
> > Lines 9547-9569 (patched)
> > <https://reviews.apache.org/r/61189/diff/2/?file=1785310#file1785310line9547>
> >
> > In fact, why not having one acceptor for each event, something like:
> > 
> > ```c++
> > // This code doesn't necesarily compile.
> > 
> > class EventTaskAddedAcceptor
> > {
> > public:
> >   static Owned create(Principal, Authorizer);
> >   
> >   bool accept(Task, FrameworkInfo);
> > 
> > private:
> >   EventTaskAddedAcceptor(
> > Owned authorizeTask,
> > Owned authorizeFramework);
> >  
> >   Owned authorizeTask_;
> >   Owned authorizeFramework_;
> > };
> > 
> > Owned EventTaskAddedAcceptor::create(
> > Principal principal, 
> > Authorizer authorizer)
> > {
> >   Future<Owned> authorizeRole =
> > AuthorizationAcceptor::create(
> > subscriber->principal,
> > subscriber->master->authorizer,
> > authorization::VIEW_ROLE);
> > 
> >   Future<Owned> authorizeFramework =
> > AuthorizationAcceptor::create(
> > subscriber->principal,
> > subscriber->authorizer,
> > authorization::VIEW_FRAMEWORK);
> > 
> >   return collect(authorizeRole, authorizeFramework)
> > .then([](tuple<Owned,
> >Owned> acceptors) {
> >   return new EventTaskAddedAcceptor(acceptors[0], acceptors[1]);
> > });
> > }
> > 
> > EventTaskAddedAcceptor::EventTaskAddedAcceptor(
> > Owned authorizeTask,
> > Owned authorizeFramework)
> >   : authorizeTask_(authorizeTask),
> > authorizeFramework_(authorizeFramework)
> > {
> > }
> > 
> > bool EventTaskAddedAcceptor::accept(Task task, FrameworkInfo info)
> > {
> >   return authorizeTask->accept(task, info) &&
> >  authorizeFramework->accept(info);
> > }
> > ```
> > 
> > This way you only need one acceptor per event and you hid the details 
> > on how the authorization is made inside the acceptor API and remove that 
> > code from the caller.

Given our decision to call authorizer for every event, this combination doesn't 
bring in much benefit.


- Quinn


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


On Aug. 17, 2017, 10:59 p.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61189/
> ---
> 
> (Updated Aug. 17, 2017, 10:59 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Alexander Rojas, and Greg Mann.
> 
> 
> Bugs: MESOS-7785
> https://issues.apache.org/jira/browse/MESOS-7785
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added authorization filtering for the V1 operator events on the
> master, the subscriber should only receive events that are
> authorized based on their principal and ACLs. Since the authorizer
> is called for every event emitted on the stream, the change of
> authorization rule will affect events that the subscribers can
> receive.
> 
> 
> Diffs
> -
> 
>   src/master/http.cpp 959091c8ec03b6ac7bcb5d21b04d2f7d5aff7d54 
>   src/master/master.hpp b802fd153a10f6012cea381f153c28cc78cae995 
>   src/master/master.cpp 7f38a5e21884546d4b4c866ca5918db779af8f99 
>   src/tests/api_tests.cpp 3ab4740bcac29ecb89585da6adb1f563d6fc1f5f 
> 
> 
> Diff: https://reviews.apache.org/r/61189/diff/3/
> 
> 
> Testing
> ---
> 
> make check
> GLOG_v=2 ./bin/mesos-tests.sh 
> --gtest_filter="ContentType/MasterAPITest.EventsAuthorizationFiltering*" 
> --verbose --gtest_repeat=100 --gtest_break_on_failure
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Re: Review Request 61262: Added 'heartbeat' event for the operator API.

2017-08-18 Thread Quinn Leng

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

(Updated Aug. 18, 2017, 6:12 p.m.)


Review request for mesos, Anand Mazumdar and Greg Mann.


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


Repository: mesos


Description
---

Added the 'HEARTBEAT' event for the operator API, modified other
related test cases to accept heartbeats.


Diffs (updated)
-

  include/mesos/master/master.proto fc5bd894ce55fe8e946d4c5b4b33d3c0505f3c2b 
  include/mesos/v1/master/master.proto c3fb31de2509adcdec8204f8bbe46b46a31540e8 
  src/master/http.cpp 959091c8ec03b6ac7bcb5d21b04d2f7d5aff7d54 
  src/master/master.hpp b802fd153a10f6012cea381f153c28cc78cae995 
  src/tests/api_tests.cpp 3ab4740bcac29ecb89585da6adb1f563d6fc1f5f 


Diff: https://reviews.apache.org/r/61262/diff/7/

Changes: https://reviews.apache.org/r/61262/diff/6-7/


Testing
---

make check -j48


Thanks,

Quinn Leng



Re: Review Request 61189: Added authorization for V1 events.

2017-08-17 Thread Quinn Leng

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

(Updated Aug. 17, 2017, 10:59 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, and Greg Mann.


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


Repository: mesos


Description (updated)
---

Added authorization filtering for the V1 operator events on the
master, the subscriber should only receive events that are
authorized based on their principal and ACLs. Since the authorizer
is called for every event emitted on the stream, the change of
authorization rule will affect events that the subscribers can
receive.


Diffs (updated)
-

  src/master/http.cpp 959091c8ec03b6ac7bcb5d21b04d2f7d5aff7d54 
  src/master/master.hpp b802fd153a10f6012cea381f153c28cc78cae995 
  src/master/master.cpp 7f38a5e21884546d4b4c866ca5918db779af8f99 
  src/tests/api_tests.cpp 3ab4740bcac29ecb89585da6adb1f563d6fc1f5f 


Diff: https://reviews.apache.org/r/61189/diff/3/

Changes: https://reviews.apache.org/r/61189/diff/2-3/


Testing
---

make check
GLOG_v=2 ./bin/mesos-tests.sh 
--gtest_filter="ContentType/MasterAPITest.EventsAuthorizationFiltering*" 
--verbose --gtest_repeat=100 --gtest_break_on_failure


Thanks,

Quinn Leng



Re: Review Request 61408: Added test cases for V1 teardown Call.

2017-08-17 Thread Quinn Leng

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

(Updated Aug. 17, 2017, 9:33 p.m.)


Review request for mesos, Anand Mazumdar and Greg Mann.


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


Repository: mesos


Description
---

Added test cases for teardown operation in V1 operator API.


Diffs (updated)
-

  src/tests/api_tests.cpp 75f7a585ec75f1d8b78453dd203bb78822ee7bc9 


Diff: https://reviews.apache.org/r/61408/diff/4/

Changes: https://reviews.apache.org/r/61408/diff/3-4/


Testing
---

make check


Thanks,

Quinn Leng



Re: Review Request 61262: Added 'heartbeat' event for the operator API.

2017-08-17 Thread Quinn Leng

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

(Updated Aug. 17, 2017, 9:20 p.m.)


Review request for mesos, Anand Mazumdar and Greg Mann.


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


Repository: mesos


Description
---

Added the 'HEARTBEAT' event for the operator API, modified other
related test cases to accept heartbeats.


Diffs (updated)
-

  include/mesos/master/master.proto fc5bd894ce55fe8e946d4c5b4b33d3c0505f3c2b 
  include/mesos/v1/master/master.proto c3fb31de2509adcdec8204f8bbe46b46a31540e8 
  src/master/http.cpp 959091c8ec03b6ac7bcb5d21b04d2f7d5aff7d54 
  src/master/master.hpp b802fd153a10f6012cea381f153c28cc78cae995 
  src/tests/api_tests.cpp 3ab4740bcac29ecb89585da6adb1f563d6fc1f5f 


Diff: https://reviews.apache.org/r/61262/diff/6/

Changes: https://reviews.apache.org/r/61262/diff/5-6/


Testing
---

make check -j48


Thanks,

Quinn Leng



Re: Review Request 61262: Added 'heartbeat' event for the operator API.

2017-08-17 Thread Quinn Leng


> On Aug. 15, 2017, 6:44 p.m., Greg Mann wrote:
> > src/master/master.hpp
> > Lines 309-311 (patched)
> > <https://reviews.apache.org/r/61262/diff/5/?file=1797997#file1797997line309>
> >
> > Now that we're sending heartbeats for multiple purposes, I'm concerned 
> > that the logging will be ambiguous. Instead of templating this class on the 
> > ID type, perhaps it makes more sense to initialize it with a string that it 
> > can use for logging purposes. For example:
> > 
> > ```
> > class Heartbeater : public process::Process
> > {
> > public:
> >   Heartbeater(const string& _message,
> >   const HttpConnection& _http,
> >   const Duration& _interval,
> >   const Duration& _delay = Seconds(0))
> > : process::ProcessBase(process::ID::generate("heartbeater")),
> >   message(_message),
> >   http(_http),
> >   interval(_interval),
> >   delay(_delay) {}
> > 
> > ...
> > 
> > private:
> >   void heartbeat()
> >   {
> > // Only send a heartbeat if the connection is not closed.
> > if (http.closed().isPending()) {
> >   VLOG(1) << "Sending heartbeat to " << message;
> >   
> >   etc...
> > ```
> > 
> > and then for the framework case we would do something like:
> > ```
> > heartbeater = new Heartbeater(
> > "framework " + stringify(info.id()),
> > http.get(),
> > DEFAULT_HEARTBEAT_INTERVAL);
> > ```
> > 
> > and the subscriber case something like:
> > ```
> > heartbeater = new Heartbeater(
> > "subscriber " + stringify(http.streamId),
> > http,
> > DEFAULT_HEARTBEAT_INTERVAL,
> > DEFAULT_HEARTBEAT_INTERVAL);
> > ```
> > 
> > what do you think?

I am also thinking about that too previously. Just not sure if this is 
compatible with our furture implementation.


- Quinn


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


On Aug. 14, 2017, 9:51 p.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61262/
> ---
> 
> (Updated Aug. 14, 2017, 9:51 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Greg Mann.
> 
> 
> Bugs: MESOS-7695
> https://issues.apache.org/jira/browse/MESOS-7695
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added the 'HEARTBEAT' event for the operator API, modified other
> related test cases to accept heartbeats.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/master.proto fc5bd894ce55fe8e946d4c5b4b33d3c0505f3c2b 
>   include/mesos/v1/master/master.proto 
> c3fb31de2509adcdec8204f8bbe46b46a31540e8 
>   src/master/http.cpp 959091c8ec03b6ac7bcb5d21b04d2f7d5aff7d54 
>   src/master/master.hpp b802fd153a10f6012cea381f153c28cc78cae995 
>   src/tests/api_tests.cpp 3ab4740bcac29ecb89585da6adb1f563d6fc1f5f 
> 
> 
> Diff: https://reviews.apache.org/r/61262/diff/5/
> 
> 
> Testing
> ---
> 
> make check -j48
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Re: Review Request 61408: Added test cases for V1 teardown Call.

2017-08-14 Thread Quinn Leng

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

(Updated Aug. 15, 2017, 12:07 a.m.)


Review request for mesos, Anand Mazumdar and Greg Mann.


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


Repository: mesos


Description
---

Added test cases for teardown operation in V1 operator API.


Diffs (updated)
-

  src/tests/api_tests.cpp 75f7a585ec75f1d8b78453dd203bb78822ee7bc9 


Diff: https://reviews.apache.org/r/61408/diff/3/

Changes: https://reviews.apache.org/r/61408/diff/2-3/


Testing
---

make check


Thanks,

Quinn Leng



Re: Review Request 61262: Added 'heartbeat' event for the operator API.

2017-08-14 Thread Quinn Leng

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

(Updated Aug. 14, 2017, 9:51 p.m.)


Review request for mesos, Anand Mazumdar and Greg Mann.


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


Repository: mesos


Description
---

Added the 'HEARTBEAT' event for the operator API, modified other
related test cases to accept heartbeats.


Diffs (updated)
-

  include/mesos/master/master.proto fc5bd894ce55fe8e946d4c5b4b33d3c0505f3c2b 
  include/mesos/v1/master/master.proto c3fb31de2509adcdec8204f8bbe46b46a31540e8 
  src/master/http.cpp 959091c8ec03b6ac7bcb5d21b04d2f7d5aff7d54 
  src/master/master.hpp b802fd153a10f6012cea381f153c28cc78cae995 
  src/tests/api_tests.cpp 75f7a585ec75f1d8b78453dd203bb78822ee7bc9 


Diff: https://reviews.apache.org/r/61262/diff/4/

Changes: https://reviews.apache.org/r/61262/diff/3-4/


Testing
---

make check -j48


Thanks,

Quinn Leng



Re: Review Request 61408: Added test cases for V1 teardown Call.

2017-08-10 Thread Quinn Leng

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

(Updated Aug. 10, 2017, 10:47 p.m.)


Review request for mesos, Anand Mazumdar and Greg Mann.


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


Repository: mesos


Description
---

Added test cases for teardown operation in V1 operator API.


Diffs (updated)
-

  src/tests/api_tests.cpp 75f7a585ec75f1d8b78453dd203bb78822ee7bc9 


Diff: https://reviews.apache.org/r/61408/diff/2/

Changes: https://reviews.apache.org/r/61408/diff/1-2/


Testing
---

make check


Thanks,

Quinn Leng



Re: Review Request 61408: Added test cases for V1 teardown Call.

2017-08-10 Thread Quinn Leng

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




src/tests/api_tests.cpp
Lines 2739-2758 (patched)
<https://reviews.apache.org/r/61408/#comment258608>

check in the unversioned teardown call test case, if it doesn't contain 
authorization test, add it here.


- Quinn Leng


On Aug. 3, 2017, 5:57 p.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61408/
> ---
> 
> (Updated Aug. 3, 2017, 5:57 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Greg Mann.
> 
> 
> Bugs: MESOS-6846
> https://issues.apache.org/jira/browse/MESOS-6846
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added test cases for teardown operation in V1 operator API.
> 
> 
> Diffs
> -
> 
>   src/tests/api_tests.cpp 1d5b080c809248bdf4c76ddad382d714692c804b 
> 
> 
> Diff: https://reviews.apache.org/r/61408/diff/1/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Re: Review Request 61262: Added 'heartbeat' event for the operator API.

2017-08-10 Thread Quinn Leng

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




src/master/master.hpp
Lines 1826 (patched)
<https://reviews.apache.org/r/61262/#comment258602>

Move the templated Heartbeater before these usages in subscriber and 
framework.



src/master/master.hpp
Line 1830 (original), 1874 (patched)
<https://reviews.apache.org/r/61262/#comment258603>

don't have to pass in the uuid, also not necessary to keep it as a class 
memeber.



src/tests/api_tests.cpp
Lines 2189 (patched)
<https://reviews.apache.org/r/61262/#comment258604>

put int into the for bracket.


- Quinn Leng


On July 31, 2017, 5:30 p.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61262/
> ---
> 
> (Updated July 31, 2017, 5:30 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Greg Mann.
> 
> 
> Bugs: MESOS-7695
> https://issues.apache.org/jira/browse/MESOS-7695
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added the 'HEARTBEAT' event for the operator API, modified other
> related test cases to accept heartbeats.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/master.proto 0e4c30e3df704a929a3bd2e1787a76421d14a983 
>   include/mesos/v1/master/master.proto 
> c04fd1602396a58086331f5fa56518c5dee9af89 
>   src/master/http.cpp 9df086c417a9392f62d600c7a6486be0a1cf7e70 
>   src/master/master.hpp 84465af782d4024f22463d981ef9d0ef7827d043 
>   src/master/master.cpp 7bb3adf48431cd97b3c404b8a1eba4ac6a01efcc 
>   src/tests/api_tests.cpp 1d5b080c809248bdf4c76ddad382d714692c804b 
> 
> 
> Diff: https://reviews.apache.org/r/61262/diff/3/
> 
> 
> Testing
> ---
> 
> make check -j48
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Review Request 61408: Added test cases for V1 teardown Call.

2017-08-03 Thread Quinn Leng

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

Review request for mesos, Anand Mazumdar and Greg Mann.


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


Repository: mesos


Description
---

Added test cases for teardown operation in V1 operator API.


Diffs
-

  src/tests/api_tests.cpp 1d5b080c809248bdf4c76ddad382d714692c804b 


Diff: https://reviews.apache.org/r/61408/diff/1/


Testing
---

make check


Thanks,

Quinn Leng



Re: Review Request 61222: Added V1 teardown Call.

2017-08-03 Thread Quinn Leng

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

(Updated Aug. 3, 2017, 5:56 p.m.)


Review request for mesos, Anand Mazumdar and Greg Mann.


Summary (updated)
-

Added V1 teardown Call.


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


Repository: mesos


Description (updated)
---

Added V1 call support for teardown operation.


Diffs (updated)
-

  include/mesos/master/master.proto 0e4c30e3df704a929a3bd2e1787a76421d14a983 
  include/mesos/v1/master/master.proto c04fd1602396a58086331f5fa56518c5dee9af89 
  src/master/http.cpp 9df086c417a9392f62d600c7a6486be0a1cf7e70 
  src/master/master.hpp 84465af782d4024f22463d981ef9d0ef7827d043 
  src/master/validation.cpp 4885339b2112b6dbdc930875c20e1f5872b1edbf 


Diff: https://reviews.apache.org/r/61222/diff/2/

Changes: https://reviews.apache.org/r/61222/diff/1-2/


Testing
---

make check


Thanks,

Quinn Leng



Review Request 61262: Added 'heartbeat' event for the operator API.

2017-07-31 Thread Quinn Leng

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

Review request for mesos, Anand Mazumdar and Greg Mann.


Repository: mesos


Description
---

Added the 'HEARTBEAT' event for the operator API, modified other
related test cases to accept heartbeats.


Diffs
-

  include/mesos/master/master.proto 7a722a6deac484f28a85f63fd68ef49cb6a47606 
  include/mesos/v1/master/master.proto cf88ea64fa08e4bdcf685de4def28d374eb32fdf 
  src/master/http.cpp 9df086c417a9392f62d600c7a6486be0a1cf7e70 
  src/master/master.hpp 84465af782d4024f22463d981ef9d0ef7827d043 
  src/master/master.cpp e12c997dad04f8a4ddb47a993a84b2b05c9e2f32 
  src/tests/api_tests.cpp f22ca28c819712d8797e0c0c69dc1ebf1fe5ac1f 


Diff: https://reviews.apache.org/r/61262/diff/1/


Testing
---

make check -j48


Thanks,

Quinn Leng



Review Request 61222: Added V1 teardown call.

2017-07-28 Thread Quinn Leng

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

Review request for mesos, Anand Mazumdar and Greg Mann.


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


Repository: mesos


Description
---

Added V1 call support for the teardown operation. Added test cases
for the V1 teardown call.


Diffs
-

  include/mesos/master/master.proto 7a722a6deac484f28a85f63fd68ef49cb6a47606 
  include/mesos/v1/master/master.proto cf88ea64fa08e4bdcf685de4def28d374eb32fdf 
  src/master/http.cpp 9df086c417a9392f62d600c7a6486be0a1cf7e70 
  src/master/master.hpp 84465af782d4024f22463d981ef9d0ef7827d043 
  src/master/validation.cpp 4885339b2112b6dbdc930875c20e1f5872b1edbf 
  src/tests/api_tests.cpp f22ca28c819712d8797e0c0c69dc1ebf1fe5ac1f 


Diff: https://reviews.apache.org/r/61222/diff/1/


Testing
---

make check


Thanks,

Quinn Leng



Re: Review Request 61194: Updated the docs for V1 Events.

2017-07-27 Thread Quinn Leng

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

(Updated July 27, 2017, 10:18 p.m.)


Review request for mesos, Anand Mazumdar and Greg Mann.


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


Repository: mesos


Description
---

Added documentation for 'AgentAdded', 'AgentRemoved',
'FrameworkAdded', 'FrameworkUpdated' and 'FrameworkRemoved' events.


Diffs (updated)
-

  docs/operator-http-api.md c096a048001453e5b7efc1fb8e3b9db835685886 


Diff: https://reviews.apache.org/r/61194/diff/2/

Changes: https://reviews.apache.org/r/61194/diff/1-2/


Testing
---


Thanks,

Quinn Leng



Review Request 61194: Updated the docs for V1 Events.

2017-07-27 Thread Quinn Leng

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

Review request for mesos, Anand Mazumdar and Greg Mann.


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


Repository: mesos


Description
---

Added documentation for 'AgentAdded', 'AgentRemoved',
'FrameworkAdded', 'FrameworkUpdated' and 'FrameworkRemoved' events.


Diffs
-

  docs/operator-http-api.md c096a048001453e5b7efc1fb8e3b9db835685886 


Diff: https://reviews.apache.org/r/61194/diff/1/


Testing
---


Thanks,

Quinn Leng



Review Request 61189: Added authorization for V1 events.

2017-07-27 Thread Quinn Leng

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

Review request for mesos, Anand Mazumdar, Alexander Rojas, and Greg Mann.


Repository: mesos


Description
---

Added authorization filtering for V1 streaming events, the
subscriber should only receive events that are authorized
based on their principal and ACLs.


Diffs
-

  src/master/http.cpp 9df086c417a9392f62d600c7a6486be0a1cf7e70 
  src/master/master.hpp 84465af782d4024f22463d981ef9d0ef7827d043 
  src/master/master.cpp e12c997dad04f8a4ddb47a993a84b2b05c9e2f32 
  src/tests/api_tests.cpp f22ca28c819712d8797e0c0c69dc1ebf1fe5ac1f 


Diff: https://reviews.apache.org/r/61189/diff/1/


Testing
---

make check
GLOG_v=2 ./bin/mesos-tests.sh 
--gtest_filter="ContentType/MasterAPITest.EventsAuthorizationFiltering*" 
--verbose --gtest_repeat=100 --gtest_break_on_failure


Thanks,

Quinn Leng



Re: Review Request 60931: Added test cases for framework streaming events.

2017-07-27 Thread Quinn Leng

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

(Updated July 27, 2017, 6:24 p.m.)


Review request for mesos, Anand Mazumdar, Greg Mann, and Zhitao Li.


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


Repository: mesos


Description
---

Added test cases for 'FRAMEWORK_ADDED', 'FRAMEWORK_UPDATED' and
'FRAMEWORK_REMOVED' events in v1 operator API.


Diffs (updated)
-

  src/tests/api_tests.cpp f22ca28c819712d8797e0c0c69dc1ebf1fe5ac1f 


Diff: https://reviews.apache.org/r/60931/diff/4/

Changes: https://reviews.apache.org/r/60931/diff/3-4/


Testing
---

make check


Thanks,

Quinn Leng



Re: Review Request 60929: Added 'FRAMEWORK_UPDATED' event for master streaming api.

2017-07-27 Thread Quinn Leng

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

(Updated July 27, 2017, 6:23 p.m.)


Review request for mesos, Anand Mazumdar, Greg Mann, and Zhitao Li.


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


Repository: mesos


Description
---

Added event 'FRAMEWORK_UPDATED' for master's v1 streaming operator API.
It will be generated when the framework re-registers with the master.


Diffs (updated)
-

  include/mesos/master/master.proto 7a722a6deac484f28a85f63fd68ef49cb6a47606 
  include/mesos/v1/master/master.proto cf88ea64fa08e4bdcf685de4def28d374eb32fdf 
  src/common/protobuf_utils.hpp 2156f6d158bfee16d29aa3531bdd156af581df01 
  src/common/protobuf_utils.cpp 4e5ab02c90ad8490efbcc471f7fd7c48be0c4678 
  src/master/master.cpp e12c997dad04f8a4ddb47a993a84b2b05c9e2f32 


Diff: https://reviews.apache.org/r/60929/diff/6/

Changes: https://reviews.apache.org/r/60929/diff/5-6/


Testing
---

make check


Thanks,

Quinn Leng



Re: Review Request 60847: Added test cases for /slaves, /slave/containers, /frameworks endpoints.

2017-07-18 Thread Quinn Leng


> On July 18, 2017, 8:23 p.m., Greg Mann wrote:
> > src/tests/master_tests.cpp
> > Lines 2523-2524 (patched)
> > <https://reviews.apache.org/r/60847/diff/3/?file=1778679#file1778679line2523>
> >
> > Newline here.

It makes the code look a little strange, one single line of comment surrounded 
by two empty lines.


> On July 18, 2017, 8:23 p.m., Greg Mann wrote:
> > src/tests/master_tests.cpp
> > Line 5866 (original), 5980-5981 (patched)
> > <https://reviews.apache.org/r/60847/diff/3/?file=1778679#file1778679line6001>
> >
> > Newline after this comment.

It makes the code look a little strange, one single line of comment surrounded 
by two empty lines.


- Quinn


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


On July 18, 2017, 6:28 p.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60847/
> ---
> 
> (Updated July 18, 2017, 6:28 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and 
> Vinod Kone.
> 
> 
> Bugs: MESOS-7630
> https://issues.apache.org/jira/browse/MESOS-7630
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added query parameter test cases for '/slaves' and '/frameworks' on
> the master, and '/slave/containers' endpoint on the slave.
> 
> 
> Diffs
> -
> 
>   src/tests/master_tests.cpp 6e6461c2e13c3eb055aa3c2d8ad8e3ac54a1d197 
>   src/tests/slave_tests.cpp 035db18db3a64a9e358c1c54cc18a4bdeb85d8bf 
> 
> 
> Diff: https://reviews.apache.org/r/60847/diff/4/
> 
> 
> Testing
> ---
> 
> Passed 'make check -j48'
> Passed 'GTEST_FILTER="MasterTest.FrameworksEndpointQueryFramework" make check 
> -j48'
> Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
> --gtest_filter="MasterTest.FrameworksEndpointQueryFramework" 
> --gtest_repeat=1000 --gtest_break_on_failure'
> Passed 'GTEST_FILTER="MasterTest.SlavesEndpointQuerySlave" make check -j48'
> Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
> --gtest_filter="MasterTest.SlavesEndpointQuerySlave" --gtest_repeat=1000 
> --gtest_break_on_failure'
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Review Request 60948: Updated test cases for the /tasks endpoint.

2017-07-18 Thread Quinn Leng

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

Review request for mesos, Alexander Rojas and Greg Mann.


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


Repository: mesos


Description
---

Optimized the code structure for '/tasks' endpoint's test cases.


Diffs
-

  src/tests/master_tests.cpp 6e6461c2e13c3eb055aa3c2d8ad8e3ac54a1d197 


Diff: https://reviews.apache.org/r/60948/diff/1/


Testing
---

make check


Thanks,

Quinn Leng



Re: Review Request 60847: Add test cases for /slaves, /slave/containers, /frameworks endpoints.

2017-07-18 Thread Quinn Leng

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

(Updated July 18, 2017, 6:28 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Added query parameter test cases for '/slaves' and '/frameworks' on
the master, and '/slave/containers' endpoint on the slave.


Diffs (updated)
-

  src/tests/master_tests.cpp 6e6461c2e13c3eb055aa3c2d8ad8e3ac54a1d197 
  src/tests/slave_tests.cpp 035db18db3a64a9e358c1c54cc18a4bdeb85d8bf 


Diff: https://reviews.apache.org/r/60847/diff/3/

Changes: https://reviews.apache.org/r/60847/diff/2-3/


Testing
---

Passed 'make check -j48'
Passed 'GTEST_FILTER="MasterTest.FrameworksEndpointQueryFramework" make check 
-j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.FrameworksEndpointQueryFramework" 
--gtest_repeat=1000 --gtest_break_on_failure'
Passed 'GTEST_FILTER="MasterTest.SlavesEndpointQuerySlave" make check -j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.SlavesEndpointQuerySlave" --gtest_repeat=1000 
--gtest_break_on_failure'


Thanks,

Quinn Leng



Re: Review Request 60822: Added filtering to /slaves, /slave/containers and /frameworks endpoints.

2017-07-18 Thread Quinn Leng

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

(Updated July 18, 2017, 6:24 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Added query parameter support for the '/master/slaves',
'/master/frameworks' and '/slave/containers' endpoints.

This allows slaves, frameworks and containers to be queried
by ID.

If no ID is specified, all records are returned, consistent
with current behavior.


Diffs (updated)
-

  src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 
  src/slave/http.hpp ad412d4e2fde13a7afa3563c611ef50b11829cac 
  src/slave/http.cpp 3070b3b06a9d9e75b9d5afb255098e63a1056ec2 


Diff: https://reviews.apache.org/r/60822/diff/5/

Changes: https://reviews.apache.org/r/60822/diff/4-5/


Testing
---

Passed 'make check -j48'


Thanks,

Quinn Leng



Re: Review Request 60820: Added class definition for the IDAcceptor.

2017-07-18 Thread Quinn Leng

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

(Updated July 18, 2017, 6:21 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description (updated)
---

This commit contains the class definitions for IDAcceptor, which is
used to filter IDs in the '/master/frameworks', '/master/slaves',
'/master/tasks', and '/slave/containers' endpoints.


Diffs
-

  src/common/http.hpp 93c9b2e58600189867b85175fe4de2dc2f6bf33e 
  src/common/http.cpp 7dce4cdc82a64702431bbc4307757ec797cf4309 
  src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 


Diff: https://reviews.apache.org/r/60820/diff/8/


Testing
---

make check -j48


Thanks,

Quinn Leng



Re: Review Request 60820: Added class definition for the IDAcceptor.

2017-07-18 Thread Quinn Leng

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

(Updated July 18, 2017, 6:19 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


Summary (updated)
-

Added class definition for the IDAcceptor.


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


Repository: mesos


Description (updated)
---

This commit contains the class definitions for IDAcceptor, which is
used to filter IDs in the '/master/frameworks', '/master/slaves' and
'/slave/containers' endpoints.


Diffs (updated)
-

  src/common/http.hpp 93c9b2e58600189867b85175fe4de2dc2f6bf33e 
  src/common/http.cpp 7dce4cdc82a64702431bbc4307757ec797cf4309 
  src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 


Diff: https://reviews.apache.org/r/60820/diff/8/

Changes: https://reviews.apache.org/r/60820/diff/7-8/


Testing
---

make check -j48


Thanks,

Quinn Leng



Re: Review Request 60820: Added class definition for SlaveID, ContainerID acceptors.

2017-07-18 Thread Quinn Leng


> On July 18, 2017, 5:54 p.m., Alexander Rojas wrote:
> > src/common/http.hpp
> > Lines 205 (patched)
> > <https://reviews.apache.org/r/60820/diff/7/?file=1776508#file1776508line205>
> >
> > Why are these default constructors necesary?

It used to be necessary because we were trying to get rid of 'Owned', and using 
the default constructor in the /slave/containers endpoint. Now it has been 
replaced by templated IDAcceptor.


- Quinn


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


On July 14, 2017, 12:10 a.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60820/
> ---
> 
> (Updated July 14, 2017, 12:10 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and 
> Vinod Kone.
> 
> 
> Bugs: MESOS-7630
> https://issues.apache.org/jira/browse/MESOS-7630
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This commit contains the class definitions for SlaveIDAcceptor and
> ContainerIDAcceptor, which are used to filter the
> '/master/frameworks', '/master/slaves' and '/slave/containers'
> endpoints.
> 
> 
> Diffs
> -
> 
>   src/common/http.hpp 93c9b2e58600189867b85175fe4de2dc2f6bf33e 
>   src/common/http.cpp 7dce4cdc82a64702431bbc4307757ec797cf4309 
> 
> 
> Diff: https://reviews.apache.org/r/60820/diff/7/
> 
> 
> Testing
> ---
> 
> make check -j48
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Review Request 60931: Added test cases for framework events.

2017-07-17 Thread Quinn Leng

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

Review request for mesos, Anand Mazumdar, Greg Mann, and Zhitao Li.


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


Repository: mesos


Description
---

Added test cases for 'FRAMEWORK_ADDED', 'FRAMEWORK_UPDATED' and
'FRAMEWORK_REMOVED' events in v1 operator API.


Diffs
-

  src/tests/api_tests.cpp f22ca28c819712d8797e0c0c69dc1ebf1fe5ac1f 


Diff: https://reviews.apache.org/r/60931/diff/1/


Testing
---

make check


Thanks,

Quinn Leng



Review Request 60930: Added 'FRAMEWORK_REMOVED' event for master streaming api.

2017-07-17 Thread Quinn Leng

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

Review request for mesos, Anand Mazumdar, Greg Mann, and Zhitao Li.


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


Repository: mesos


Description
---

Added 'FRAMEWORK_REMOVED' event for master streaming api.


Diffs
-

  include/mesos/master/master.proto 7a722a6deac484f28a85f63fd68ef49cb6a47606 
  include/mesos/v1/master/master.proto cf88ea64fa08e4bdcf685de4def28d374eb32fdf 
  src/common/protobuf_utils.hpp 2156f6d158bfee16d29aa3531bdd156af581df01 
  src/common/protobuf_utils.cpp 4e5ab02c90ad8490efbcc471f7fd7c48be0c4678 
  src/master/master.cpp d895154c00eef17511c46ddd0b75922f952707eb 


Diff: https://reviews.apache.org/r/60930/diff/1/


Testing
---

make check


Thanks,

Quinn Leng



Review Request 60929: Added 'FRAMEWORK_UPDATED' event for master streaming event.

2017-07-17 Thread Quinn Leng

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

Review request for mesos, Anand Mazumdar, Greg Mann, Vinod Kone, and Zhitao Li.


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


Repository: mesos


Description
---

Added event 'FRAMEWORK_UPDATED' for master's v1 streaming operator API.
It will be generated when the framework re-registers with the master.


Diffs
-

  include/mesos/master/master.proto 7a722a6deac484f28a85f63fd68ef49cb6a47606 
  include/mesos/v1/master/master.proto cf88ea64fa08e4bdcf685de4def28d374eb32fdf 
  src/common/protobuf_utils.hpp 2156f6d158bfee16d29aa3531bdd156af581df01 
  src/common/protobuf_utils.cpp 4e5ab02c90ad8490efbcc471f7fd7c48be0c4678 
  src/master/master.cpp d895154c00eef17511c46ddd0b75922f952707eb 


Diff: https://reviews.apache.org/r/60929/diff/1/


Testing
---

make check


Thanks,

Quinn Leng



Review Request 60928: Added 'FRAMEWORK_ADDED' event for master streaming event.

2017-07-17 Thread Quinn Leng

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

Review request for mesos, Anand Mazumdar, Greg Mann, Vinod Kone, and Zhitao Li.


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


Repository: mesos


Description
---

Added event 'FRAMEWORK_ADDED' for master's v1 streaming operator API.


Diffs
-

  include/mesos/master/master.proto 7a722a6deac484f28a85f63fd68ef49cb6a47606 
  include/mesos/v1/master/master.proto cf88ea64fa08e4bdcf685de4def28d374eb32fdf 
  src/common/protobuf_utils.hpp 2156f6d158bfee16d29aa3531bdd156af581df01 
  src/common/protobuf_utils.cpp 4e5ab02c90ad8490efbcc471f7fd7c48be0c4678 
  src/master/master.cpp d895154c00eef17511c46ddd0b75922f952707eb 


Diff: https://reviews.apache.org/r/60928/diff/1/


Testing
---

make check


Thanks,

Quinn Leng



Re: Review Request 60847: Add test cases for /slaves, /slave/containers, /frameworks endpoints.

2017-07-13 Thread Quinn Leng

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

(Updated July 14, 2017, 1:43 a.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


Summary (updated)
-

Add test cases for /slaves, /slave/containers, /frameworks endpoints.


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


Repository: mesos


Description (updated)
---

Added query parameter test cases for '/slaves' and '/frameworks' on
the master, and '/slave/containers' endpoint on the slave.


Diffs (updated)
-

  src/tests/master_tests.cpp 6e6461c2e13c3eb055aa3c2d8ad8e3ac54a1d197 
  src/tests/slave_tests.cpp 035db18db3a64a9e358c1c54cc18a4bdeb85d8bf 


Diff: https://reviews.apache.org/r/60847/diff/2/

Changes: https://reviews.apache.org/r/60847/diff/1-2/


Testing
---

Passed 'make check -j48'
Passed 'GTEST_FILTER="MasterTest.FrameworksEndpointQueryFramework" make check 
-j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.FrameworksEndpointQueryFramework" 
--gtest_repeat=1000 --gtest_break_on_failure'
Passed 'GTEST_FILTER="MasterTest.SlavesEndpointQuerySlave" make check -j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.SlavesEndpointQuerySlave" --gtest_repeat=1000 
--gtest_break_on_failure'


Thanks,

Quinn Leng



Re: Review Request 60716: Cleaned up authentication acceptor to have one class.

2017-07-13 Thread Quinn Leng

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

(Updated July 14, 2017, 12:29 a.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description (updated)
---

Replaced different authorization-related Acceptor classes with one
AuthorizationAcceptor class.

Removed the ObjectAcceptor parent class, since no inheritance features
are provided by it.


Diffs
-

  src/common/http.hpp 93c9b2e58600189867b85175fe4de2dc2f6bf33e 
  src/common/http.cpp 7dce4cdc82a64702431bbc4307757ec797cf4309 
  src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 


Diff: https://reviews.apache.org/r/60716/diff/5/


Testing
---

Passed "make check -j48"
Passed 'GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48'


Thanks,

Quinn Leng



Re: Review Request 60279: Added constructors for ObjectApprover::Object.

2017-07-13 Thread Quinn Leng

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

(Updated July 14, 2017, 12:24 a.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


Summary (updated)
-

Added constructors for ObjectApprover::Object.


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


Repository: mesos


Description (updated)
---

Added new constructors and updated all places where
ObjectApprover::Objects are constructed to use new
constructors.


Diffs
-

  include/mesos/authorizer/authorizer.hpp 
95cbcf3f9a962a896c9c23e961f02eb16dff36f8 
  src/common/http.cpp fdb591eccf273260902f3f695cf431f72ee3d817 
  src/master/http.cpp 175a44ce7fb5be509453c25eaa9ec29f35adba3a 
  src/slave/http.cpp 700871e1502a65b0bb1fc31219e09219dbdb5340 


Diff: https://reviews.apache.org/r/60279/diff/4/


Testing
---

Passed "make check -j48"
Passed 'GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48'


Thanks,

Quinn Leng



Re: Review Request 60822: Added filtering to /slaves, /slave/containers and /frameworks endpoints.

2017-07-13 Thread Quinn Leng

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

(Updated July 14, 2017, 12:13 a.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description (updated)
---

Added query parameter support for the '/master/slaves',
'/master/frameworks' and '/slave/containers' endpoints.

This allows slaves, frameworks and containers to be queried
by ID.

If no ID is specified, all records are returned, consistent
with current behavior.


Diffs (updated)
-

  src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 
  src/slave/http.hpp ad412d4e2fde13a7afa3563c611ef50b11829cac 
  src/slave/http.cpp 3070b3b06a9d9e75b9d5afb255098e63a1056ec2 


Diff: https://reviews.apache.org/r/60822/diff/4/

Changes: https://reviews.apache.org/r/60822/diff/3-4/


Testing
---

Passed 'make check -j48'


Thanks,

Quinn Leng



Re: Review Request 60822: Added filtering to /slaves, /slave/containers and /frameworks endpoints.

2017-07-13 Thread Quinn Leng


> On July 13, 2017, 9:09 p.m., Quinn Leng wrote:
> > src/master/http.cpp
> > Lines 1561-1562 (original), 1579-1580 (patched)
> > <https://reviews.apache.org/r/60822/diff/3/?file=1776167#file1776167line1593>
> >
> > Fit one line.

It's too long to fit in one line.


> On July 13, 2017, 9:09 p.m., Quinn Leng wrote:
> > src/slave/http.hpp
> > Line 117 (original), 117 (patched)
> > <https://reviews.apache.org/r/60822/diff/3/?file=1776168#file1776168line117>
> >
> > const reference

It's better to give flexibility to other's implementation, which might destroy 
the object. Thus it's better to keep a copy.


> On July 13, 2017, 9:09 p.m., Quinn Leng wrote:
> > src/slave/http.cpp
> > Line 2112 (original), 2109 (patched)
> > <https://reviews.apache.org/r/60822/diff/3/?file=1776169#file1776169line2117>
> >
> > const ref

It's better to give flexibility to other's implementation, which might destroy 
the object. Thus it's better to keep a copy.


- Quinn


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


On July 13, 2017, 10:59 p.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60822/
> ---
> 
> (Updated July 13, 2017, 10:59 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and 
> Vinod Kone.
> 
> 
> Bugs: MESOS-7630
> https://issues.apache.org/jira/browse/MESOS-7630
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added query parameter support for the '/master/slaves',
> '/master/frameworks' and '/slave/containers' endpoints. 
> 
> This allows slaves, frameworks and containers to be queried
> by ID.
> 
> If no ID is specified, all records are returned, consistent
> with current behavior.
> 
> 
> Diffs
> -
> 
>   src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 
>   src/slave/http.hpp ad412d4e2fde13a7afa3563c611ef50b11829cac 
>   src/slave/http.cpp 3070b3b06a9d9e75b9d5afb255098e63a1056ec2 
> 
> 
> Diff: https://reviews.apache.org/r/60822/diff/3/
> 
> 
> Testing
> ---
> 
> Passed 'make check -j48'
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Re: Review Request 60820: Added class definition for SlaveID, ContainerID acceptors.

2017-07-13 Thread Quinn Leng

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

(Updated July 14, 2017, 12:10 a.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

This commit contains the class definitions for SlaveIDAcceptor and
ContainerIDAcceptor, which are used to filter the
'/master/frameworks', '/master/slaves' and '/slave/containers'
endpoints.


Diffs (updated)
-

  src/common/http.hpp 93c9b2e58600189867b85175fe4de2dc2f6bf33e 
  src/common/http.cpp 7dce4cdc82a64702431bbc4307757ec797cf4309 


Diff: https://reviews.apache.org/r/60820/diff/7/

Changes: https://reviews.apache.org/r/60820/diff/6-7/


Testing
---

make check -j48


Thanks,

Quinn Leng



Re: Review Request 60716: Cleaned up authentication acceptor to have one class.

2017-07-13 Thread Quinn Leng

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

(Updated July 14, 2017, 12:10 a.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Replace different authorization-related Acceptor classes with one
AuthorizationAcceptor class.

Removed the ObjectAcceptor parent class, since no inheritance features
are provided by it.


Diffs (updated)
-

  src/common/http.hpp 93c9b2e58600189867b85175fe4de2dc2f6bf33e 
  src/common/http.cpp 7dce4cdc82a64702431bbc4307757ec797cf4309 
  src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 


Diff: https://reviews.apache.org/r/60716/diff/5/

Changes: https://reviews.apache.org/r/60716/diff/4-5/


Testing
---

Passed "make check -j48"
Passed 'GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48'


Thanks,

Quinn Leng



Re: Review Request 60822: Added filtering to /slaves, /slave/containers and /frameworks endpoints.

2017-07-13 Thread Quinn Leng

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

(Updated July 13, 2017, 10:59 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


Summary (updated)
-

Added filtering to /slaves, /slave/containers and /frameworks endpoints.


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


Repository: mesos


Description
---

Added query parameter support for the '/master/slaves',
'/master/frameworks' and '/slave/containers' endpoints. 

This allows slaves, frameworks and containers to be queried
by ID.

If no ID is specified, all records are returned, consistent
with current behavior.


Diffs
-

  src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 
  src/slave/http.hpp ad412d4e2fde13a7afa3563c611ef50b11829cac 
  src/slave/http.cpp 3070b3b06a9d9e75b9d5afb255098e63a1056ec2 


Diff: https://reviews.apache.org/r/60822/diff/3/


Testing
---

Passed 'make check -j48'


Thanks,

Quinn Leng



Re: Review Request 60847: Added test cases for /slaves, /containers, /frameworks endpoints.

2017-07-13 Thread Quinn Leng

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




src/tests/master_tests.cpp
Lines 2545 (patched)
<https://reviews.apache.org/r/60847/#comment255659>

s/std::string/string/ if possible, here and elsewhere.



src/tests/master_tests.cpp
Lines 2556-2557 (patched)
<https://reviews.apache.org/r/60847/#comment255660>

Fits on one line



src/tests/master_tests.cpp
Lines 2559-2560 (patched)
<https://reviews.apache.org/r/60847/#comment255661>

Newline.



src/tests/master_tests.cpp
Lines 2580 (patched)
<https://reviews.apache.org/r/60847/#comment255662>

s/slave/agent/



src/tests/master_tests.cpp
Lines 2604-2605 (patched)
<https://reviews.apache.org/r/60847/#comment255663>

One line



src/tests/master_tests.cpp
Lines 6013 (patched)
<https://reviews.apache.org/r/60847/#comment255664>

s/Ensure/Ensures/



src/tests/master_tests.cpp
Lines 6050 (patched)
<https://reviews.apache.org/r/60847/#comment255667>

Add a request with no query parameter to verify that both frameworks are 
returned.

If you remove the previous test, rename this one something like 
"FrameworkEndpointMultipleFrameworks"



src/tests/master_tests.cpp
Lines 6085-6117 (patched)
<https://reviews.apache.org/r/60847/#comment255666>

Kill this.



src/tests/master_tests.cpp
Lines 6121-6123 (patched)
<https://reviews.apache.org/r/60847/#comment255665>

Try to wait until master has marked framework as completed.



src/tests/slave_tests.cpp
Line 2361 (original), 2361 (patched)
<https://reviews.apache.org/r/60847/#comment255668>

s/executors. And/executors, and/


- Quinn Leng


On July 13, 2017, 9:11 p.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60847/
> ---
> 
> (Updated July 13, 2017, 9:11 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and 
> Vinod Kone.
> 
> 
> Bugs: MESOS-7630
> https://issues.apache.org/jira/browse/MESOS-7630
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added query parameter test cases for '/slaves' and '/frameworks' on
> the master, and '/containers' endpoint on the agent.
> 
> 
> Diffs
> -
> 
>   src/tests/master_tests.cpp 6e6461c2e13c3eb055aa3c2d8ad8e3ac54a1d197 
>   src/tests/slave_tests.cpp 035db18db3a64a9e358c1c54cc18a4bdeb85d8bf 
> 
> 
> Diff: https://reviews.apache.org/r/60847/diff/1/
> 
> 
> Testing
> ---
> 
> Passed 'make check -j48'
> Passed 'GTEST_FILTER="MasterTest.FrameworksEndpointQueryFramework" make check 
> -j48'
> Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
> --gtest_filter="MasterTest.FrameworksEndpointQueryFramework" 
> --gtest_repeat=1000 --gtest_break_on_failure'
> Passed 'GTEST_FILTER="MasterTest.SlavesEndpointQuerySlave" make check -j48'
> Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
> --gtest_filter="MasterTest.SlavesEndpointQuerySlave" --gtest_repeat=1000 
> --gtest_break_on_failure'
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Re: Review Request 60847: Added test cases for /slaves, /containers, /frameworks endpoints.

2017-07-13 Thread Quinn Leng

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

(Updated July 13, 2017, 9:11 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


Summary (updated)
-

Added test cases for /slaves, /containers, /frameworks endpoints.


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


Repository: mesos


Description (updated)
---

Added query parameter test cases for '/slaves' and '/frameworks' on
the master, and '/containers' endpoint on the agent.


Diffs
-

  src/tests/master_tests.cpp 6e6461c2e13c3eb055aa3c2d8ad8e3ac54a1d197 
  src/tests/slave_tests.cpp 035db18db3a64a9e358c1c54cc18a4bdeb85d8bf 


Diff: https://reviews.apache.org/r/60847/diff/1/


Testing
---

Passed 'make check -j48'
Passed 'GTEST_FILTER="MasterTest.FrameworksEndpointQueryFramework" make check 
-j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.FrameworksEndpointQueryFramework" 
--gtest_repeat=1000 --gtest_break_on_failure'
Passed 'GTEST_FILTER="MasterTest.SlavesEndpointQuerySlave" make check -j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.SlavesEndpointQuerySlave" --gtest_repeat=1000 
--gtest_break_on_failure'


Thanks,

Quinn Leng



Re: Review Request 60822: Add filtering to /slaves, /slave/containers and /frameworks endpoints.

2017-07-13 Thread Quinn Leng

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




src/master/http.cpp
Lines 1539-1540 (original), 1553-1554 (patched)
<https://reviews.apache.org/r/60822/#comment255644>

Fit in one line.



src/master/http.cpp
Line 1542 (original), 1556 (patched)
<https://reviews.apache.org/r/60822/#comment255646>

without a matching ID.



src/master/http.cpp
Lines 1561-1562 (original), 1579-1580 (patched)
<https://reviews.apache.org/r/60822/#comment255645>

Fit one line.



src/master/http.cpp
Line 1564 (original), 1582 (patched)
<https://reviews.apache.org/r/60822/#comment255647>

same here



src/master/http.cpp
Line 2466 (original), 2483-2484 (patched)
<https://reviews.apache.org/r/60822/#comment255648>

Combine these two in one line.



src/master/http.cpp
Lines 2492-2493 (patched)
<https://reviews.apache.org/r/60822/#comment255649>

If possible:

```
return OK(
jsonify(SlavesWriter(master->slaves, authorizeRole, selectSlaveId)),
jsonp);
```



src/slave/http.hpp
Line 117 (original), 117 (patched)
<https://reviews.apache.org/r/60822/#comment255653>

const reference



src/slave/http.cpp
Lines 2046-2047 (original), 2046-2047 (patched)
<https://reviews.apache.org/r/60822/#comment255652>

Try doing:
```
return __containers(authorizeContainer, None());
```



src/slave/http.cpp
Line 2083 (original), 2080 (patched)
<https://reviews.apache.org/r/60822/#comment255656>

too many spaces



src/slave/http.cpp
Line 2112 (original), 2109 (patched)
<https://reviews.apache.org/r/60822/#comment255654>

    const ref


- Quinn Leng


On July 13, 2017, 8:30 p.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60822/
> ---
> 
> (Updated July 13, 2017, 8:30 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and 
> Vinod Kone.
> 
> 
> Bugs: MESOS-7630
> https://issues.apache.org/jira/browse/MESOS-7630
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added query parameter support for the '/master/slaves',
> '/master/frameworks' and '/slave/containers' endpoints. 
> 
> This allows slaves, frameworks and containers to be queried
> by ID.
> 
> If no ID is specified, all records are returned, consistent
> with current behavior.
> 
> 
> Diffs
> -
> 
>   src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 
>   src/slave/http.hpp ad412d4e2fde13a7afa3563c611ef50b11829cac 
>   src/slave/http.cpp 3070b3b06a9d9e75b9d5afb255098e63a1056ec2 
> 
> 
> Diff: https://reviews.apache.org/r/60822/diff/3/
> 
> 
> Testing
> ---
> 
> Passed 'make check -j48'
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Re: Review Request 60822: Add filtering to /slaves, /slave/containers and /frameworks endpoints.

2017-07-13 Thread Quinn Leng

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

(Updated July 13, 2017, 8:30 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description (updated)
---

Added query parameter support for the '/master/slaves',
'/master/frameworks' and '/slave/containers' endpoints. 

This allows slaves, frameworks and containers to be queried
by ID.

If no ID is specified, all records are returned, consistent
with current behavior.


Diffs
-

  src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 
  src/slave/http.hpp ad412d4e2fde13a7afa3563c611ef50b11829cac 
  src/slave/http.cpp 3070b3b06a9d9e75b9d5afb255098e63a1056ec2 


Diff: https://reviews.apache.org/r/60822/diff/3/


Testing
---

Passed 'make check -j48'


Thanks,

Quinn Leng



Re: Review Request 60820: Added class definition for SlaveID, ContainerID acceptors.

2017-07-13 Thread Quinn Leng

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




src/common/http.hpp
Lines 204-205 (patched)
<https://reviews.apache.org/r/60820/#comment255642>

New line between these two lines


- Quinn Leng


On July 13, 2017, 8:23 p.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60820/
> ---
> 
> (Updated July 13, 2017, 8:23 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and 
> Vinod Kone.
> 
> 
> Bugs: MESOS-7630
> https://issues.apache.org/jira/browse/MESOS-7630
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This commit contains the class definitions for SlaveIDAcceptor and
> ContainerIDAcceptor, which are used to filter the
> '/master/frameworks', '/master/slaves' and '/slave/containers'
> endpoints.
> 
> 
> Diffs
> -
> 
>   src/common/http.hpp 93c9b2e58600189867b85175fe4de2dc2f6bf33e 
>   src/common/http.cpp 7dce4cdc82a64702431bbc4307757ec797cf4309 
> 
> 
> Diff: https://reviews.apache.org/r/60820/diff/6/
> 
> 
> Testing
> ---
> 
> make check -j48
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Re: Review Request 60716: Cleaned up authentication acceptor to have one class.

2017-07-13 Thread Quinn Leng

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




src/common/http.hpp
Lines 225-226 (original), 204-205 (patched)
<https://reviews.apache.org/r/60716/#comment255643>

New line between these two lines.


- Quinn Leng


On July 13, 2017, 8:18 p.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60716/
> ---
> 
> (Updated July 13, 2017, 8:18 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and 
> Vinod Kone.
> 
> 
> Bugs: MESOS-7630
> https://issues.apache.org/jira/browse/MESOS-7630
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Replace different authorization-related Acceptor classes with one
> AuthorizationAcceptor class.
> 
> Removed the ObjectAcceptor parent class, since no inheritance features
> are provided by it.
> 
> 
> Diffs
> -
> 
>   src/common/http.hpp 93c9b2e58600189867b85175fe4de2dc2f6bf33e 
>   src/common/http.cpp 7dce4cdc82a64702431bbc4307757ec797cf4309 
>   src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 
> 
> 
> Diff: https://reviews.apache.org/r/60716/diff/4/
> 
> 
> Testing
> ---
> 
> Passed "make check -j48"
> Passed 'GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48'
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Re: Review Request 60820: Added class definition for SlaveID, ContainerID acceptors.

2017-07-13 Thread Quinn Leng

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

(Updated July 13, 2017, 8:23 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


Summary (updated)
-

Added class definition for SlaveID, ContainerID acceptors.


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


Repository: mesos


Description (updated)
---

This commit contains the class definitions for SlaveIDAcceptor and
ContainerIDAcceptor, which are used to filter the
'/master/frameworks', '/master/slaves' and '/slave/containers'
endpoints.


Diffs
-

  src/common/http.hpp 93c9b2e58600189867b85175fe4de2dc2f6bf33e 
  src/common/http.cpp 7dce4cdc82a64702431bbc4307757ec797cf4309 


Diff: https://reviews.apache.org/r/60820/diff/6/


Testing
---

make check -j48


Thanks,

Quinn Leng



Re: Review Request 60716: Cleaned up authentication acceptor to have one class.

2017-07-13 Thread Quinn Leng

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

(Updated July 13, 2017, 8:18 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description (updated)
---

Replace different authorization-related Acceptor classes with one
AuthorizationAcceptor class.

Removed the ObjectAcceptor parent class, since no inheritance features
are provided by it.


Diffs
-

  src/common/http.hpp 93c9b2e58600189867b85175fe4de2dc2f6bf33e 
  src/common/http.cpp 7dce4cdc82a64702431bbc4307757ec797cf4309 
  src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 


Diff: https://reviews.apache.org/r/60716/diff/4/


Testing
---

Passed "make check -j48"
Passed 'GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48'


Thanks,

Quinn Leng



Re: Review Request 60580: Added filtering to the '/frameworks' endpoint.

2017-07-13 Thread Quinn Leng

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

(Updated July 13, 2017, 8:12 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Added filtering to the '/frameworks' endpoint.

Add query parameter support for '/frameworks' endpoint.
To query the information about a specific framework, we
can use 'framework_id' to specify the framework, thus it
looks like'/frameworks?framework_id=[framework id]'

To maintain consistency, the structure for response is
reserved, thus the response still contains field 'frameworks'
and 'completed_frameworks' etc..

Since code for '/state' endpoint and '/frameworks' are coupled
(they share 'FullFrameworkWriter' class), thus the code for '/state'
endpoint is also updated.


Diffs
-

  src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 
  src/tests/master_tests.cpp 6e6461c2e13c3eb055aa3c2d8ad8e3ac54a1d197 


Diff: https://reviews.apache.org/r/60580/diff/4/


Testing
---

Passed 'make check -j48'
Passed 'GTEST_FILTER="MasterTest.FrameworksEndpointQueryFramework" make check 
-j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.FrameworksEndpointQueryFramework" 
--gtest_repeat=1000 --gtest_break_on_failure'


Thanks,

Quinn Leng



Review Request 60847: Add test cases for /slaves, /slave/containers, /frameworks endpoints.

2017-07-13 Thread Quinn Leng

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

Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Added query parameter test cases for '/slaves' and '/frameworks' on
the master, and '/slave/containers' endpoint on the slave.


Diffs
-

  src/tests/master_tests.cpp 6e6461c2e13c3eb055aa3c2d8ad8e3ac54a1d197 
  src/tests/slave_tests.cpp 035db18db3a64a9e358c1c54cc18a4bdeb85d8bf 


Diff: https://reviews.apache.org/r/60847/diff/1/


Testing
---

Passed 'make check -j48'
Passed 'GTEST_FILTER="MasterTest.FrameworksEndpointQueryFramework" make check 
-j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.FrameworksEndpointQueryFramework" 
--gtest_repeat=1000 --gtest_break_on_failure'
Passed 'GTEST_FILTER="MasterTest.SlavesEndpointQuerySlave" make check -j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.SlavesEndpointQuerySlave" --gtest_repeat=1000 
--gtest_break_on_failure'


Thanks,

Quinn Leng



Re: Review Request 60822: Add filtering to /slaves, /slave/containers and /frameworks endpoints.

2017-07-13 Thread Quinn Leng

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

(Updated July 13, 2017, 6:04 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Added query parameter support for 'slaves'
endpoint. We can use 'slave_id' to specify
which slave information to query. Thus it
looks like '/slaves?slave_id=[slave id]'

If not slave id is specified, it will return
information of all slaves, just like before

The structure for response is the same for both
specifying or not specifying slave id. Thus even
for request with slave id specified, the response
will still contain both fields 'slaves',
'recovered_slaves' etc..

Add query parameter support for '/frameworks' endpoint.
To query the information about a specific framework, we
can use 'framework_id' to specify the framework, thus it
looks like'/frameworks?framework_id=[framework id]'

To maintain consistency, the structure for response is
reserved, thus the response still contains field 'frameworks'
and 'completed_frameworks' etc..

Since code for '/state' endpoint and '/frameworks' are coupled
(they share 'FullFrameworkWriter' class), thus the code for '/state'
endpoint is also updated.

Add query parameter support for '/slave/containers' endpoint.
To get the information about a specific container, you can specify
the container_id. The request would look like
'/slave/containers?container_id=[container id]'.

When no container id is specified, it will return the information
about all containers.


Diffs (updated)
-

  src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 
  src/slave/http.hpp ad412d4e2fde13a7afa3563c611ef50b11829cac 
  src/slave/http.cpp 3070b3b06a9d9e75b9d5afb255098e63a1056ec2 


Diff: https://reviews.apache.org/r/60822/diff/3/

Changes: https://reviews.apache.org/r/60822/diff/2-3/


Testing
---

Passed 'make check -j48'
Passed 'GTEST_FILTER="MasterTest.FrameworksEndpointQueryFramework" make check 
-j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.FrameworksEndpointQueryFramework" 
--gtest_repeat=1000 --gtest_break_on_failure'
Passed 'GTEST_FILTER="MasterTest.SlavesEndpointQuerySlave" make check -j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.SlavesEndpointQuerySlave" --gtest_repeat=1000 
--gtest_break_on_failure'


Thanks,

Quinn Leng



Re: Review Request 60820: Add class definition for SlaveID, ContainerID acceptors.

2017-07-12 Thread Quinn Leng

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



To resolve dependency issue between reviews
(correlation between these three endpoints
through SlaveWriter, FullFrameworkWriter)

https://reviews.apache.org/r/60712/ ,
https://reviews.apache.org/r/60580/ ,
https://reviews.apache.org/r/60581/
These three patches are merged and closed. This is
the class definition part of the merged code.

- Quinn Leng


On July 13, 2017, 12:22 a.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60820/
> ---
> 
> (Updated July 13, 2017, 12:22 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and 
> Vinod Kone.
> 
> 
> Bugs: MESOS-7630
> https://issues.apache.org/jira/browse/MESOS-7630
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This commit contains the class definition for SlaveID, ContainerID,
> which are used in filtering for '/frameworks', '/slaves' and
> '/slave/containers' endpoint.
> 
> 
> Diffs
> -
> 
>   src/common/http.hpp 93c9b2e58600189867b85175fe4de2dc2f6bf33e 
>   src/common/http.cpp 7dce4cdc82a64702431bbc4307757ec797cf4309 
> 
> 
> Diff: https://reviews.apache.org/r/60820/diff/4/
> 
> 
> Testing
> ---
> 
> make check -j48
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Review Request 60822: Add filtering to /slaves and /frameworks endpoints.

2017-07-12 Thread Quinn Leng

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

Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Add filtering to /slaves and /frameworks endpoints.

Added query parameter support for 'slaves'
endpoint. We can use 'slave_id' to specify
which slave information to query. Thus it
looks like '/slaves?slave_id=[slave id]'

If not slave id is specified, it will return
information of all slaves, just like before

The structure for response is the same for both
specifying or not specifying slave id. Thus even
for request with slave id specified, the response
will still contain both fields 'slaves', 
'recovered_slaves' etc..

Add query parameter support for '/frameworks' endpoint.
To query the information about a specific framework, we
can use 'framework_id' to specify the framework, thus it
looks like'/frameworks?framework_id=[framework id]'

To maintain consistency, the structure for response is
reserved, thus the response still contains field 'frameworks'
and 'completed_frameworks' etc..

Since code for '/state' endpoint and '/frameworks' are coupled
(they share 'FullFrameworkWriter' class), thus the code for '/state'
endpoint is also updated.


Diffs
-

  src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 


Diff: https://reviews.apache.org/r/60822/diff/1/


Testing
---

Passed 'make check -j48'
Passed 'GTEST_FILTER="MasterTest.FrameworksEndpointQueryFramework" make check 
-j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.FrameworksEndpointQueryFramework" 
--gtest_repeat=1000 --gtest_break_on_failure'
Passed 'GTEST_FILTER="MasterTest.SlavesEndpointQuerySlave" make check -j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.SlavesEndpointQuerySlave" --gtest_repeat=1000 
--gtest_break_on_failure'


Thanks,

Quinn Leng



Re: Review Request 60822: Add filtering to /slaves, /slave/containers and /frameworks endpoints.

2017-07-12 Thread Quinn Leng

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

(Updated July 13, 2017, 12:32 a.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


Summary (updated)
-

Add filtering to /slaves, /slave/containers and /frameworks endpoints.


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


Repository: mesos


Description (updated)
---

Added query parameter support for 'slaves'
endpoint. We can use 'slave_id' to specify
which slave information to query. Thus it
looks like '/slaves?slave_id=[slave id]'

If not slave id is specified, it will return
information of all slaves, just like before

The structure for response is the same for both
specifying or not specifying slave id. Thus even
for request with slave id specified, the response
will still contain both fields 'slaves',
'recovered_slaves' etc..

Add query parameter support for '/frameworks' endpoint.
To query the information about a specific framework, we
can use 'framework_id' to specify the framework, thus it
looks like'/frameworks?framework_id=[framework id]'

To maintain consistency, the structure for response is
reserved, thus the response still contains field 'frameworks'
and 'completed_frameworks' etc..

Since code for '/state' endpoint and '/frameworks' are coupled
(they share 'FullFrameworkWriter' class), thus the code for '/state'
endpoint is also updated.

Add query parameter support for '/slave/containers' endpoint.
To get the information about a specific container, you can specify
the container_id. The request would look like
'/slave/containers?container_id=[container id]'.

When no container id is specified, it will return the information
about all containers.


Diffs (updated)
-

  src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 
  src/slave/http.hpp ad412d4e2fde13a7afa3563c611ef50b11829cac 
  src/slave/http.cpp 3070b3b06a9d9e75b9d5afb255098e63a1056ec2 


Diff: https://reviews.apache.org/r/60822/diff/2/

Changes: https://reviews.apache.org/r/60822/diff/1-2/


Testing
---

Passed 'make check -j48'
Passed 'GTEST_FILTER="MasterTest.FrameworksEndpointQueryFramework" make check 
-j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.FrameworksEndpointQueryFramework" 
--gtest_repeat=1000 --gtest_break_on_failure'
Passed 'GTEST_FILTER="MasterTest.SlavesEndpointQuerySlave" make check -j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.SlavesEndpointQuerySlave" --gtest_repeat=1000 
--gtest_break_on_failure'


Thanks,

Quinn Leng



Re: Review Request 60820: Add class definition for SlaveID, ContainerID acceptors.

2017-07-12 Thread Quinn Leng

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

(Updated July 13, 2017, 12:22 a.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


Summary (updated)
-

Add class definition for SlaveID, ContainerID acceptors.


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


Repository: mesos


Description (updated)
---

Add class definition for SlaveID, ContainerID acceptors.

To resolve dependency issue 
(correlation between these three endpoints through SlaveWriter, 
FullFrameworkWriter)
between reviews
https://reviews.apache.org/r/60712/ ,
https://reviews.apache.org/r/60580/ ,
https://reviews.apache.org/r/60581/ 
These three patches are merged and closed. This is
the class definition part of the merged code.


Diffs (updated)
-

  src/common/http.hpp 93c9b2e58600189867b85175fe4de2dc2f6bf33e 
  src/common/http.cpp 7dce4cdc82a64702431bbc4307757ec797cf4309 


Diff: https://reviews.apache.org/r/60820/diff/2/

Changes: https://reviews.apache.org/r/60820/diff/1-2/


Testing
---

make check -j48


Thanks,

Quinn Leng



Review Request 60820: Add class definition for SlaveID acceptor.

2017-07-12 Thread Quinn Leng

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

Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Add class definition for SlaveID acceptor.

To resolve the dependency issue (they are correlated
by SlaveWriter, FrameworkWriter through the /state endpoint)
between reviews
https://reviews.apache.org/r/60712/ ,
https://reviews.apache.org/r/60580/ ,
https://reviews.apache.org/r/60581/
these three patches are merged and closed.
This patch contains the class definition
for the merged code.


Diffs
-

  src/common/http.hpp 93c9b2e58600189867b85175fe4de2dc2f6bf33e 
  src/common/http.cpp 7dce4cdc82a64702431bbc4307757ec797cf4309 


Diff: https://reviews.apache.org/r/60820/diff/1/


Testing
---

make check -j48


Thanks,

Quinn Leng



Re: Review Request 60716: Cleaned up authentication acceptor to have one class.

2017-07-12 Thread Quinn Leng


> On July 11, 2017, 5:23 p.m., Greg Mann wrote:
> > src/common/http.hpp
> > Line 178 (original), 188 (patched)
> > <https://reviews.apache.org/r/60716/diff/2/?file=1771727#file1771727line191>
> >
> > If we take the approver by rvalue reference here - i.e., 
> > `Owned&&` - then we can avoid copies:
> > 
> > ```
> > AuthorizationAcceptor(const process::Owned&& approver)
> >   : objectApprover(std::forward(approver)) {}
> > 
> > ```
> 
> Greg Mann wrote:
> Could you drop this instead of resolving, since we decided to drop it?

Oh, since it's written in TODO, I guess it's not 'dropped' in definition. 
Anyway, I can drop it now.


> On July 11, 2017, 5:23 p.m., Greg Mann wrote:
> > src/common/http.cpp
> > Line 1144 (original), 1121 (patched)
> > <https://reviews.apache.org/r/60716/diff/2/?file=1771728#file1771728line1144>
> >
> > In this context, the `AcceptingObjectApprover` seems like an 
> > unnecessary level of indirection to me. What do you think about making the 
> > `objectApprover` member an `Option<Owned>`, and then 
> > `accept()` could return true if `objectApprover.isNone()`?
> > 
> > We could take care of this with a follow-up patch.
> 
> Greg Mann wrote:
> Were you going to take care of this in a follow-up patch? If so, please 
> reply accordingly and drop the issue.

That's a good update, I can do that in follow-up patch.


- Quinn


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


On July 12, 2017, 1:17 a.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60716/
> ---
> 
> (Updated July 12, 2017, 1:17 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and 
> Vinod Kone.
> 
> 
> Bugs: MESOS-7630
> https://issues.apache.org/jira/browse/MESOS-7630
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Cleaned up authentication acceptor to have one class.
> 
> Replace different Authorization related Acceptor classes with one
> AuthorizationAcceptor class.
> 
> Single static create function for AuthorizationAcceptor. 
> Templated 'accept' function to take different number and types of
> parameters.
> 
> Removed ObjectAcceptor parent class, since no inheritance feature
> provided by it.
> 
> 
> Diffs
> -
> 
>   src/common/http.hpp 93c9b2e58600189867b85175fe4de2dc2f6bf33e 
>   src/common/http.cpp 7dce4cdc82a64702431bbc4307757ec797cf4309 
>   src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 
> 
> 
> Diff: https://reviews.apache.org/r/60716/diff/3/
> 
> 
> Testing
> ---
> 
> Passed "make check -j48"
> Passed 'GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48'
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Re: Review Request 60580: Added filtering to the '/frameworks' endpoint.

2017-07-12 Thread Quinn Leng

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

(Updated July 12, 2017, 6:19 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Added filtering to the '/frameworks' endpoint.

Add query parameter support for '/frameworks' endpoint.
To query the information about a specific framework, we
can use 'framework_id' to specify the framework, thus it
looks like'/frameworks?framework_id=[framework id]'

To maintain consistency, the structure for response is
reserved, thus the response still contains field 'frameworks'
and 'completed_frameworks' etc..

Since code for '/state' endpoint and '/frameworks' are coupled
(they share 'FullFrameworkWriter' class), thus the code for '/state'
endpoint is also updated.


Diffs (updated)
-

  src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 
  src/tests/master_tests.cpp 6e6461c2e13c3eb055aa3c2d8ad8e3ac54a1d197 


Diff: https://reviews.apache.org/r/60580/diff/4/

Changes: https://reviews.apache.org/r/60580/diff/3-4/


Testing
---

Passed 'make check -j48'
Passed 'GTEST_FILTER="MasterTest.FrameworksEndpointQueryFramework" make check 
-j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.FrameworksEndpointQueryFramework" 
--gtest_repeat=1000 --gtest_break_on_failure'


Thanks,

Quinn Leng



Re: Review Request 60716: Cleaned up authentication acceptor to have one class.

2017-07-12 Thread Quinn Leng


> On July 12, 2017, 5:50 p.m., Greg Mann wrote:
> > src/common/http.hpp
> > Lines 175-177 (original), 173-185 (patched)
> > <https://reviews.apache.org/r/60716/diff/3/?file=1774543#file1774543line176>
> >
> > Is there a reason this implementation is placed in the header?

It is not possible to write the implementation of a template class in a 
separate cpp file and compile.  
https://stackoverflow.com/questions/1724036/splitting-templated-c-classes-into-hpp-cpp-files-is-it-possible


- Quinn


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


On July 12, 2017, 1:17 a.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60716/
> ---
> 
> (Updated July 12, 2017, 1:17 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and 
> Vinod Kone.
> 
> 
> Bugs: MESOS-7630
> https://issues.apache.org/jira/browse/MESOS-7630
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Cleaned up authentication acceptor to have one class.
> 
> Replace different Authorization related Acceptor classes with one
> AuthorizationAcceptor class.
> 
> Single static create function for AuthorizationAcceptor. 
> Templated 'accept' function to take different number and types of
> parameters.
> 
> Removed ObjectAcceptor parent class, since no inheritance feature
> provided by it.
> 
> 
> Diffs
> -
> 
>   src/common/http.hpp 93c9b2e58600189867b85175fe4de2dc2f6bf33e 
>   src/common/http.cpp 7dce4cdc82a64702431bbc4307757ec797cf4309 
>   src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 
> 
> 
> Diff: https://reviews.apache.org/r/60716/diff/3/
> 
> 
> Testing
> ---
> 
> Passed "make check -j48"
> Passed 'GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48'
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Re: Review Request 60716: Cleaned up authentication acceptor to have one class.

2017-07-12 Thread Quinn Leng

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

(Updated July 12, 2017, 6:09 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Cleaned up authentication acceptor to have one class.

Replace different Authorization related Acceptor classes with one
AuthorizationAcceptor class.

Single static create function for AuthorizationAcceptor. 
Templated 'accept' function to take different number and types of
parameters.

Removed ObjectAcceptor parent class, since no inheritance feature
provided by it.


Diffs (updated)
-

  src/common/http.hpp 93c9b2e58600189867b85175fe4de2dc2f6bf33e 
  src/common/http.cpp 7dce4cdc82a64702431bbc4307757ec797cf4309 
  src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 


Diff: https://reviews.apache.org/r/60716/diff/4/

Changes: https://reviews.apache.org/r/60716/diff/3-4/


Testing
---

Passed "make check -j48"
Passed 'GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48'


Thanks,

Quinn Leng



Re: Review Request 60716: Cleaned up authentication acceptor to have one class.

2017-07-11 Thread Quinn Leng

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

(Updated July 12, 2017, 1:17 a.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Cleaned up authentication acceptor to have one class.

Replace different Authorization related Acceptor classes with one
AuthorizationAcceptor class.

Single static create function for AuthorizationAcceptor. 
Templated 'accept' function to take different number and types of
parameters.

Removed ObjectAcceptor parent class, since no inheritance feature
provided by it.


Diffs (updated)
-

  src/common/http.hpp 93c9b2e58600189867b85175fe4de2dc2f6bf33e 
  src/common/http.cpp 7dce4cdc82a64702431bbc4307757ec797cf4309 
  src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 


Diff: https://reviews.apache.org/r/60716/diff/3/

Changes: https://reviews.apache.org/r/60716/diff/2-3/


Testing
---

Passed "make check -j48"
Passed 'GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48'


Thanks,

Quinn Leng



Re: Review Request 60712: Added filtering support for '/slave/containers' endpoint.

2017-07-07 Thread Quinn Leng

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

(Updated July 7, 2017, 11:47 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Added filtering support for '/slave/containers' endpoint.

Add query parameter support for '/slave/containers' endpoint.
To get the information about a specific container, you can specify
the container_id. The request would look like
'/slave/containers?container_id=[container id]'.

When no container id is specified, it will return the information
about all containers.


Diffs (updated)
-

  src/common/http.hpp b7e4a8adcbcaa3a962af795c67694a35161b6c1a 
  src/common/http.cpp fdb591eccf273260902f3f695cf431f72ee3d817 
  src/slave/http.hpp ad412d4e2fde13a7afa3563c611ef50b11829cac 
  src/slave/http.cpp 700871e1502a65b0bb1fc31219e09219dbdb5340 
  src/tests/slave_tests.cpp 8a69cc2ede0b2f17a31986e9142aa2081691eb5e 


Diff: https://reviews.apache.org/r/60712/diff/2/

Changes: https://reviews.apache.org/r/60712/diff/1-2/


Testing
---

Passed 'make check -j48'
Passed 'GLOG_v=1 ./bin/mesos-test.sh 
--gtest_filter=SlaveTest.ContainersEndpoint --gtest_repeat=1000 
--gtest_break_on_failure'


Thanks,

Quinn Leng



Re: Review Request 60580: Added filtering to the '/frameworks' endpoint.

2017-07-07 Thread Quinn Leng

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

(Updated July 7, 2017, 11:20 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Added filtering to the '/frameworks' endpoint.

Add query parameter support for '/frameworks' endpoint.
To query the information about a specific framework, we
can use 'framework_id' to specify the framework, thus it
looks like'/frameworks?framework_id=[framework id]'

To maintain consistency, the structure for response is
reserved, thus the response still contains field 'frameworks'
and 'completed_frameworks' etc..

Since code for '/state' endpoint and '/frameworks' are coupled
(they share 'FullFrameworkWriter' class), thus the code for '/state'
endpoint is also updated.


Diffs (updated)
-

  src/master/http.cpp 175a44ce7fb5be509453c25eaa9ec29f35adba3a 
  src/tests/master_tests.cpp c778c6c56d47c4033189912cebee6024be79106f 


Diff: https://reviews.apache.org/r/60580/diff/3/

Changes: https://reviews.apache.org/r/60580/diff/2-3/


Testing
---

Passed 'make check -j48'
Passed 'GTEST_FILTER="MasterTest.FrameworksEndpointQueryFramework" make check 
-j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.FrameworksEndpointQueryFramework" 
--gtest_repeat=1000 --gtest_break_on_failure'


Thanks,

Quinn Leng



Re: Review Request 60581: Added filtering to the '/slaves' endpoint.

2017-07-07 Thread Quinn Leng

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

(Updated July 7, 2017, 10:36 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Added filtering to the '/slaves' endpoint.

Added query parameter support for 'slaves'
endpoint. We can use 'slave_id' to specify
which slave information to query. Thus it
looks like '/slaves?slave_id=[slave id]'

If not slave id is specified, it will return
information of all slaves, just like before

The structure for response is the same for both
specifying or not specifying slave id. Thus even
for request with slave id specified, the response
will still contain both fields 'slaves', 
'recovered_slaves' etc..


Diffs (updated)
-

  src/common/http.hpp b7e4a8adcbcaa3a962af795c67694a35161b6c1a 
  src/common/http.cpp fdb591eccf273260902f3f695cf431f72ee3d817 
  src/master/http.cpp 175a44ce7fb5be509453c25eaa9ec29f35adba3a 
  src/tests/master_tests.cpp c778c6c56d47c4033189912cebee6024be79106f 


Diff: https://reviews.apache.org/r/60581/diff/4/

Changes: https://reviews.apache.org/r/60581/diff/3-4/


Testing
---

Passed 'make check -j48'
Passed 'GTEST_FILTER="MasterTest.SlavesEndpointQuerySlave" make check -j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.SlavesEndpointQuerySlave" --gtest_repeat=1000 
--gtest_break_on_failure'


Thanks,

Quinn Leng



Re: Review Request 60716: Cleaned up authentication acceptor to have one class.

2017-07-07 Thread Quinn Leng

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

(Updated July 7, 2017, 10:25 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description (updated)
---

Cleaned up authentication acceptor to have one class.

Replace different Authorization related Acceptor classes with one
AuthorizationAcceptor class.

Single static create function for AuthorizationAcceptor, single
acceptor function accepting ObjectApprover::Object.

Templated 'accept' function to take different number and types of
parameters.

Removed ObjectAcceptor parent class, since no inheritance feature
provided by it.


Diffs (updated)
-

  src/common/http.hpp b7e4a8adcbcaa3a962af795c67694a35161b6c1a 
  src/common/http.cpp fdb591eccf273260902f3f695cf431f72ee3d817 
  src/master/http.cpp 175a44ce7fb5be509453c25eaa9ec29f35adba3a 


Diff: https://reviews.apache.org/r/60716/diff/2/

Changes: https://reviews.apache.org/r/60716/diff/1-2/


Testing
---

Passed "make check -j48"
Passed 'GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48'


Thanks,

Quinn Leng



Review Request 60716: Cleaned up authentication acceptor to have one class.

2017-07-07 Thread Quinn Leng

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

Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Cleaned up authentication acceptor to have one class.

Replace different Authorization related Acceptor classes with one
AuthorizationAcceptor class.

Single static create function for AuthorizationAcceptor, single
acceptor function accepting ObjectApprover::Object.

Removed ObjectAcceptor parent class, since no inheritance feature
provided by it.


Diffs
-

  src/common/http.hpp b7e4a8adcbcaa3a962af795c67694a35161b6c1a 
  src/common/http.cpp fdb591eccf273260902f3f695cf431f72ee3d817 
  src/master/http.cpp 175a44ce7fb5be509453c25eaa9ec29f35adba3a 


Diff: https://reviews.apache.org/r/60716/diff/1/


Testing
---

Passed "make check -j48"
Passed 'GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48'


Thanks,

Quinn Leng



Re: Review Request 60279: Add constructor for ObjectApprover::Object.

2017-07-07 Thread Quinn Leng

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

(Updated July 7, 2017, 8:01 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description (updated)
---

Add constructor for ObjectApprover::Object.

Updated all places where ObjectApprover::Objects
are constructed to use the constructor.


Diffs (updated)
-

  include/mesos/authorizer/authorizer.hpp 
95cbcf3f9a962a896c9c23e961f02eb16dff36f8 
  src/common/http.cpp fdb591eccf273260902f3f695cf431f72ee3d817 
  src/master/http.cpp 175a44ce7fb5be509453c25eaa9ec29f35adba3a 
  src/slave/http.cpp 700871e1502a65b0bb1fc31219e09219dbdb5340 


Diff: https://reviews.apache.org/r/60279/diff/4/

Changes: https://reviews.apache.org/r/60279/diff/3-4/


Testing
---

Passed "make check -j48"
Passed 'GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48'


Thanks,

Quinn Leng



Re: Review Request 60279: Add constructor for ObjectApprover::Object.

2017-07-07 Thread Quinn Leng

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

(Updated July 7, 2017, 6:52 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description (updated)
---

Add constructor for ObjectApprover::Object.

Replace different Authorization related Acceptor classes with one
AuthorizationAcceptor class.

Single static create function for AuthorizationAcceptor, single
acceptor function accepting ObjectApprover::Object.

Removed ObjectAcceptor parent class, since no inheritance feature
provided by it.


Diffs (updated)
-

  include/mesos/authorizer/authorizer.hpp 
95cbcf3f9a962a896c9c23e961f02eb16dff36f8 
  src/common/http.hpp b7e4a8adcbcaa3a962af795c67694a35161b6c1a 
  src/common/http.cpp fdb591eccf273260902f3f695cf431f72ee3d817 
  src/master/http.cpp 175a44ce7fb5be509453c25eaa9ec29f35adba3a 
  src/slave/http.cpp 700871e1502a65b0bb1fc31219e09219dbdb5340 


Diff: https://reviews.apache.org/r/60279/diff/3/

Changes: https://reviews.apache.org/r/60279/diff/2-3/


Testing (updated)
---

Passed "make check -j48"
Passed 'GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48'


Thanks,

Quinn Leng



Review Request 60712: Added filtering support for '/slave/containers' endpoint.

2017-07-07 Thread Quinn Leng

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

Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Added filtering support for '/slave/containers' endpoint.

Add query parameter support for '/slave/containers' endpoint.
To get the information about a specific container, you can specify
the container_id. The request would look like
'/slave/containers?container_id=[container id]'.

When no container id is specified, it will return the information
about all containers.


Diffs
-

  src/common/http.hpp b7e4a8adcbcaa3a962af795c67694a35161b6c1a 
  src/common/http.cpp fdb591eccf273260902f3f695cf431f72ee3d817 
  src/slave/http.hpp ad412d4e2fde13a7afa3563c611ef50b11829cac 
  src/slave/http.cpp 700871e1502a65b0bb1fc31219e09219dbdb5340 
  src/tests/slave_tests.cpp 8a69cc2ede0b2f17a31986e9142aa2081691eb5e 


Diff: https://reviews.apache.org/r/60712/diff/1/


Testing
---

Passed 'make check -j48'
Passed 'GLOG_v=1 ./bin/mesos-test.sh 
--gtest_filter=SlaveTest.ContainersEndpoint --gtest_repeat=1000 
--gtest_break_on_failure'


Thanks,

Quinn Leng



Re: Review Request 60107: Added filtering to the '/tasks' endpoint.

2017-07-05 Thread Quinn Leng


> On July 5, 2017, 8:02 p.m., Alexander Rojas wrote:
> > src/common/http.cpp
> > Lines 1199-1200 (patched)
> > <https://reviews.apache.org/r/60107/diff/15/?file=1767978#file1767978line1199>
> >
> > make use of the new constructors.

Yep, the new constructor patch will be merged after these commits submitted


> On July 5, 2017, 8:02 p.m., Alexander Rojas wrote:
> > src/common/http.cpp
> > Lines 1217-1219 (patched)
> > <https://reviews.apache.org/r/60107/diff/15/?file=1767978#file1767978line1217>
> >
> > Make use of the new constructors.

Yep, the new constructor patch will be merged after these commits submitted


- Quinn


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


On June 30, 2017, 11:57 p.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60107/
> ---
> 
> (Updated June 30, 2017, 11:57 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and 
> Vinod Kone.
> 
> 
> Bugs: MESOS-7630
> https://issues.apache.org/jira/browse/MESOS-7630
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added filtering to the '/tasks' endpoint.
> 
> 
> Diffs
> -
> 
>   src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
>   src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
>   src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
>   src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 
> 
> 
> Diff: https://reviews.apache.org/r/60107/diff/15/
> 
> 
> Testing
> ---
> 
> Passed "make check"
> Passed "GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48"
> Passed "GLOG_v=1 ./bin/mesos-tests.sh 
> --gtest_filter="MasterTest.TasksEndpoint" --gtest_repeat=1000 
> --gtest_break_on_failure"
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Re: Review Request 60580: Added filtering to the '/frameworks' endpoint.

2017-07-05 Thread Quinn Leng

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

(Updated July 5, 2017, 4:30 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description (updated)
---

Added filtering to the '/frameworks' endpoint.

Add query parameter support for '/frameworks' endpoint.
To query the information about a specific framework, we
can use 'framework_id' to specify the framework, thus it
looks like'/frameworks?framework_id=[framework id]'

To maintain consistency, the structure for response is
reserved, thus the response still contains field 'frameworks'
and 'completed_frameworks' etc..

Since code for '/state' endpoint and '/frameworks' are coupled
(they share 'FullFrameworkWriter' class), thus the code for '/state'
endpoint is also updated.


Diffs
-

  src/common/http.hpp b7e4a8adcbcaa3a962af795c67694a35161b6c1a 
  src/common/http.cpp fdb591eccf273260902f3f695cf431f72ee3d817 
  src/master/http.cpp 64b7cdd1c42a067bf24e302b9496bb75cb916590 
  src/tests/master_tests.cpp d21194fb19781a24223d6b0d8f99987f4edb5a9a 


Diff: https://reviews.apache.org/r/60580/diff/2/


Testing
---

Passed 'make check -j48'
Passed 'GTEST_FILTER="MasterTest.FrameworksEndpointQueryFramework" make check 
-j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.FrameworksEndpointQueryFramework" 
--gtest_repeat=1000 --gtest_break_on_failure'


Thanks,

Quinn Leng



Re: Review Request 60581: Added filtering to the '/slaves' endpoint.

2017-07-05 Thread Quinn Leng

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

(Updated July 5, 2017, 4:28 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description (updated)
---

Added filtering to the '/slaves' endpoint.

Added query parameter support for 'slaves'
endpoint. We can use 'slave_id' to specify
which slave information to query. Thus it
looks like '/slaves?slave_id=[slave id]'

If not slave id is specified, it will return
information of all slaves, just like before

The structure for response is the same for both
specifying or not specifying slave id. Thus even
for request with slave id specified, the response
will still contain both fields 'slaves', 
'recovered_slaves' etc..


Diffs
-

  src/common/http.hpp b7e4a8adcbcaa3a962af795c67694a35161b6c1a 
  src/common/http.cpp fdb591eccf273260902f3f695cf431f72ee3d817 
  src/master/http.cpp 64b7cdd1c42a067bf24e302b9496bb75cb916590 
  src/tests/master_tests.cpp d21194fb19781a24223d6b0d8f99987f4edb5a9a 


Diff: https://reviews.apache.org/r/60581/diff/3/


Testing
---

Passed 'make check -j48'
Passed 'GTEST_FILTER="MasterTest.SlavesEndpointQuerySlave" make check -j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.SlavesEndpointQuerySlave" --gtest_repeat=1000 
--gtest_break_on_failure'


Thanks,

Quinn Leng



Re: Review Request 60107: Added filtering to the '/tasks' endpoint.

2017-07-03 Thread Quinn Leng


> On July 3, 2017, 9:51 a.m., Alexander Rojas wrote:
> > I think the acceptor files do not belong in the `common/http.?pp` files. 
> > Perhaps create a new header called acceptors?

Agree, since these Acceptors contain logic about not only HTTP request but also 
Authorization. It's better to move these logic into one specific file. Do you 
think it's good to call it common/acceptor.?pp


> On July 3, 2017, 9:51 a.m., Alexander Rojas wrote:
> > src/common/http.hpp
> > Lines 163-171 (patched)
> > <https://reviews.apache.org/r/60107/diff/15/?file=1767977#file1767977line163>
> >
> > This class is not necessary. The acceptor as a concept exist, but we 
> > don't use any of the advantages of inheritance, I think this would be 
> > served better in a namespace.

It's kind of inbetween logically consistent and programacally consistent. We 
haven't used a lot of inheritance feature (overriding) of the concept, but 
there do exist some logical inheritance connection between them. This 
ObjectAcceptor connects these AuthorizeAcceptor and IDAcceptor.


> On July 3, 2017, 9:51 a.m., Alexander Rojas wrote:
> > src/common/http.hpp
> > Lines 175-229 (patched)
> > <https://reviews.apache.org/r/60107/diff/15/?file=1767977#file1767977line175>
> >
> > What is the point of having multiple different 
> > `AuthorizationAcceptors`? Each have a method with a different signature, so 
> > I can see them merge into one common acceptor.

One possible issue with single AuthorizationAcceptor is that we initialize an 
approver for each AuthorizationAcceptor, and these approvers are initialized 
with different parameters (specifically, the authorization::VIEW_TASK, 
authorization::VIEW_FRAMEWORK .etc..), thus it's not good idea to have one 
AuthorizationAcceptor providing authorization for different kind of objects. 
Alternatively, we can use multiple AuthorizationAcceptor objects, each is an 
instance of AuthorizationAcceptor initialized with different constructor, but 
then it will be necessary that we call the correct kind of 'accept' for that 
AuthorizationAcceptor. That might be confusing.


> On July 3, 2017, 9:51 a.m., Alexander Rojas wrote:
> > src/common/http.hpp
> > Lines 181 (patched)
> > <https://reviews.apache.org/r/60107/diff/15/?file=1767977#file1767977line181>
> >
> > This should be a const reference, we don't want to copy `Owned` 
> > pointers.

Agree, I'll update it in another patch. Thanks for pointing out~


- Quinn


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


On June 30, 2017, 11:57 p.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60107/
> ---
> 
> (Updated June 30, 2017, 11:57 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and 
> Vinod Kone.
> 
> 
> Bugs: MESOS-7630
> https://issues.apache.org/jira/browse/MESOS-7630
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added filtering to the '/tasks' endpoint.
> 
> 
> Diffs
> -
> 
>   src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
>   src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
>   src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
>   src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 
> 
> 
> Diff: https://reviews.apache.org/r/60107/diff/15/
> 
> 
> Testing
> ---
> 
> Passed "make check"
> Passed "GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48"
> Passed "GLOG_v=1 ./bin/mesos-tests.sh 
> --gtest_filter="MasterTest.TasksEndpoint" --gtest_repeat=1000 
> --gtest_break_on_failure"
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Re: Review Request 60580: Added filtering to the '/frameworks' endpoint.

2017-07-03 Thread Quinn Leng

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

(Updated July 3, 2017, 8:10 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description (updated)
---

Added filtering to the '/frameworks' endpoint.


Diffs (updated)
-

  src/common/http.hpp b7e4a8adcbcaa3a962af795c67694a35161b6c1a 
  src/common/http.cpp fdb591eccf273260902f3f695cf431f72ee3d817 
  src/master/http.cpp 64b7cdd1c42a067bf24e302b9496bb75cb916590 
  src/tests/master_tests.cpp d21194fb19781a24223d6b0d8f99987f4edb5a9a 


Diff: https://reviews.apache.org/r/60580/diff/2/

Changes: https://reviews.apache.org/r/60580/diff/1-2/


Testing
---

Passed 'make check -j48'
Passed 'GTEST_FILTER="MasterTest.FrameworksEndpointQueryFramework" make check 
-j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.FrameworksEndpointQueryFramework" 
--gtest_repeat=1000 --gtest_break_on_failure'


Thanks,

Quinn Leng



Re: Review Request 60581: Added filtering to the '/slaves' endpoint.

2017-07-03 Thread Quinn Leng

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

(Updated July 3, 2017, 7:03 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description (updated)
---

Added filtering to the '/slaves' endpoint.


Diffs (updated)
-

  src/common/http.hpp b7e4a8adcbcaa3a962af795c67694a35161b6c1a 
  src/common/http.cpp fdb591eccf273260902f3f695cf431f72ee3d817 
  src/master/http.cpp 64b7cdd1c42a067bf24e302b9496bb75cb916590 
  src/tests/master_tests.cpp d21194fb19781a24223d6b0d8f99987f4edb5a9a 


Diff: https://reviews.apache.org/r/60581/diff/3/

Changes: https://reviews.apache.org/r/60581/diff/2-3/


Testing
---

Passed 'make check -j48'
Passed 'GTEST_FILTER="MasterTest.SlavesEndpointQuerySlave" make check -j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.SlavesEndpointQuerySlave" --gtest_repeat=1000 
--gtest_break_on_failure'


Thanks,

Quinn Leng



Re: Review Request 60107: Added filtering to the '/tasks' endpoint.

2017-06-30 Thread Quinn Leng

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

(Updated June 30, 2017, 11:57 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Added filtering to the '/tasks' endpoint.


Diffs (updated)
-

  src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
  src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
  src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
  src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 


Diff: https://reviews.apache.org/r/60107/diff/15/

Changes: https://reviews.apache.org/r/60107/diff/14-15/


Testing
---

Passed "make check"
Passed "GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48"
Passed "GLOG_v=1 ./bin/mesos-tests.sh --gtest_filter="MasterTest.TasksEndpoint" 
--gtest_repeat=1000 --gtest_break_on_failure"


Thanks,

Quinn Leng



Re: Review Request 60107: Added filtering to the '/tasks' endpoint.

2017-06-30 Thread Quinn Leng

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

(Updated June 30, 2017, 11:46 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Added filtering to the '/tasks' endpoint.


Diffs (updated)
-

  src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
  src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
  src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
  src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 


Diff: https://reviews.apache.org/r/60107/diff/14/

Changes: https://reviews.apache.org/r/60107/diff/13-14/


Testing
---

Passed "make check"
Passed "GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48"
Passed "GLOG_v=1 ./bin/mesos-tests.sh --gtest_filter="MasterTest.TasksEndpoint" 
--gtest_repeat=1000 --gtest_break_on_failure"


Thanks,

Quinn Leng



Re: Review Request 60107: Added filtering to the '/tasks' endpoint.

2017-06-30 Thread Quinn Leng

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

(Updated June 30, 2017, 11:37 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Added filtering to the '/tasks' endpoint.


Diffs (updated)
-

  src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
  src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
  src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
  src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 


Diff: https://reviews.apache.org/r/60107/diff/13/

Changes: https://reviews.apache.org/r/60107/diff/12-13/


Testing
---

Passed "make check"
Passed "GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48"
Passed "GLOG_v=1 ./bin/mesos-tests.sh --gtest_filter="MasterTest.TasksEndpoint" 
--gtest_repeat=1000 --gtest_break_on_failure"


Thanks,

Quinn Leng



Re: Review Request 60107: Added filtering to the '/tasks' endpoint.

2017-06-30 Thread Quinn Leng

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

(Updated June 30, 2017, 11:26 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description (updated)
---

Added filtering to the '/tasks' endpoint.


Diffs (updated)
-

  src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
  src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
  src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
  src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 


Diff: https://reviews.apache.org/r/60107/diff/12/

Changes: https://reviews.apache.org/r/60107/diff/11-12/


Testing
---

Passed "make check"
Passed "GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48"
Passed "GLOG_v=1 ./bin/mesos-tests.sh --gtest_filter="MasterTest.TasksEndpoint" 
--gtest_repeat=1000 --gtest_break_on_failure"


Thanks,

Quinn Leng



Re: Review Request 60581: Added filtering to the '/slaves' endpoint.

2017-06-30 Thread Quinn Leng

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

(Updated June 30, 2017, 10:44 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description (updated)
---

Added filtering to the '/slaves' endpoint.

Added query parameter support for 'slaves'
endpoint. We can use 'slave_id' to specify
which slave information to query. Thus it
looks like '/slaves?slave_id=[slave id]'

If not slave id is specified, it will return
information of all slaves, just like before

The structure for response is the same for both
specifying or not specifying slave id. Thus even
for request with slave id specified, the response
will still contain both fields 'slaves', 
'recovered_slaves' etc..


Diffs (updated)
-

  src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
  src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
  src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
  src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 


Diff: https://reviews.apache.org/r/60581/diff/2/

Changes: https://reviews.apache.org/r/60581/diff/1-2/


Testing
---

Passed 'make check -j48'
Passed 'GTEST_FILTER="MasterTest.SlavesEndpointQuerySlave" make check -j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.SlavesEndpointQuerySlave" --gtest_repeat=1000 
--gtest_break_on_failure'


Thanks,

Quinn Leng



Review Request 60581: Added filtering to the '/slaves' endpoint.

2017-06-30 Thread Quinn Leng

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

Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Added filtering to the '/slaves' endpoint.

Add query parameter support for that endpoint,
to get the information of one slave, we can use
'slave_id' as the query parameter. Thus it looks 
like '/slaves?slave_id=[slave id]'

When no slave_id is specified, it will return
information of all slaves.

The structure for the response is reserved, thus
even if slave_id is specified, the structure for
response still contains field 'slaves' and
'recovered_slaves' etc..


Diffs
-

  src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
  src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
  src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
  src/tests/.master_tests.cpp.swp PRE-CREATION 
  src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 


Diff: https://reviews.apache.org/r/60581/diff/1/


Testing
---

Passed 'make check -j48'
Passed 'GTEST_FILTER="MasterTest.SlavesEndpointQuerySlave" make check -j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.SlavesEndpointQuerySlave" --gtest_repeat=1000 
--gtest_break_on_failure'


Thanks,

Quinn Leng



Review Request 60580: Added filtering to the '/frameworks' endpoint.

2017-06-30 Thread Quinn Leng

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

Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Added filtering to the '/frameworks' endpoint.

Add query parameter support for '/frameworks' endpoint.
To query the information about a specific framework, we
can use 'framework_id' to specify the framework, thus it
looks like'/frameworks?framework_id=[framework id]'

To maintain consistency, the structure for response is 
reserved, thus the response still contains field 'frameworks'
and 'completed_frameworks' etc..

Since code for '/state' endpoint and '/frameworks' are coupled
(they share 'FullFrameworkWriter' class), thus the code for '/state'
endpoint is also updated.


Diffs
-

  src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
  src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
  src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
  src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 


Diff: https://reviews.apache.org/r/60580/diff/1/


Testing
---

Passed 'make check -j48'
Passed 'GTEST_FILTER="MasterTest.FrameworksEndpointQueryFramework" make check 
-j48'
Passed 'GLOG_v=1 ./bin/mesos-tests.sh 
--gtest_filter="MasterTest.FrameworksEndpointQueryFramework" 
--gtest_repeat=1000 --gtest_break_on_failure'


Thanks,

Quinn Leng



Re: Review Request 60107: Added filtering to the '/tasks' endpoint.

2017-06-29 Thread Quinn Leng

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

(Updated June 30, 2017, 1:37 a.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description (updated)
---

Added filtering to the '/tasks' endpoint.

Added query parameter support for '/tasks' endpoint.
To query a specific task, you can specify 'task_id'
and 'framework_id' in the query parameter. Thus the
format would look like 
{{'/tasks?framework_id=[framework id]_id=[task id]'}}

If no task id and framework id specified, it will return
the whole list of tasks just like previous version.


Diffs
-

  src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
  src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
  src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
  src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 


Diff: https://reviews.apache.org/r/60107/diff/11/


Testing
---

Passed "make check"
Passed "GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48"
Passed "GLOG_v=1 ./bin/mesos-tests.sh --gtest_filter="MasterTest.TasksEndpoint" 
--gtest_repeat=1000 --gtest_break_on_failure"


Thanks,

Quinn Leng



Re: Review Request 60107: Added filtering to the '/tasks' endpoint.

2017-06-29 Thread Quinn Leng

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

(Updated June 29, 2017, 7:55 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Added filtering to the '/tasks' endpoint.


Diffs (updated)
-

  src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
  src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
  src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
  src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 


Diff: https://reviews.apache.org/r/60107/diff/11/

Changes: https://reviews.apache.org/r/60107/diff/10-11/


Testing
---

Passed "make check"
Passed "GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48"
Passed "GLOG_v=1 ./bin/mesos-tests.sh --gtest_filter="MasterTest.TasksEndpoint" 
--gtest_repeat=1000 --gtest_break_on_failure"


Thanks,

Quinn Leng



Re: Review Request 60107: Added filtering to the '/tasks' endpoint.

2017-06-29 Thread Quinn Leng


> On June 29, 2017, 1:12 a.m., Vinod Kone wrote:
> > src/tests/master_tests.cpp
> > Lines 3510 (patched)
> > <https://reviews.apache.org/r/60107/diff/9/?file=1766749#file1766749line3511>
> >
> > is the order not determinisitc in our tests?

It's not deterministic, since tasks are stored in hashmap (which is implemented 
by unordered_map), the order it decided by the size of the bucket, the hash 
function, thus we can not guarantee the order


- Quinn


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


On June 29, 2017, 12:47 a.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60107/
> ---
> 
> (Updated June 29, 2017, 12:47 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and 
> Vinod Kone.
> 
> 
> Bugs: MESOS-7630
> https://issues.apache.org/jira/browse/MESOS-7630
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added filtering to the '/tasks' endpoint.
> 
> 
> Diffs
> -
> 
>   src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
>   src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
>   src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
>   src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 
> 
> 
> Diff: https://reviews.apache.org/r/60107/diff/9/
> 
> 
> Testing
> ---
> 
> Passed "make check"
> Passed "GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48"
> Passed "GLOG_v=1 ./bin/mesos-tests.sh 
> --gtest_filter="MasterTest.TasksEndpoint" --gtest_repeat=1000 
> --gtest_break_on_failure"
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Re: Review Request 60107: Added filtering to the '/tasks' endpoint.

2017-06-29 Thread Quinn Leng

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

(Updated June 29, 2017, 6:09 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Added filtering to the '/tasks' endpoint.


Diffs (updated)
-

  src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
  src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
  src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
  src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 


Diff: https://reviews.apache.org/r/60107/diff/10/

Changes: https://reviews.apache.org/r/60107/diff/9-10/


Testing
---

Passed "make check"
Passed "GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48"
Passed "GLOG_v=1 ./bin/mesos-tests.sh --gtest_filter="MasterTest.TasksEndpoint" 
--gtest_repeat=1000 --gtest_break_on_failure"


Thanks,

Quinn Leng



Re: Review Request 60107: Added filtering to the '/tasks' endpoint.

2017-06-28 Thread Quinn Leng

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

(Updated June 29, 2017, 12:47 a.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Added filtering to the '/tasks' endpoint.


Diffs (updated)
-

  src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
  src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
  src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
  src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 


Diff: https://reviews.apache.org/r/60107/diff/9/

Changes: https://reviews.apache.org/r/60107/diff/8-9/


Testing
---

Passed "make check"
Passed "GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48"
Passed "GLOG_v=1 ./bin/mesos-tests.sh --gtest_filter="MasterTest.TasksEndpoint" 
--gtest_repeat=1000 --gtest_break_on_failure"


Thanks,

Quinn Leng



Re: Review Request 60107: Added filtering to the '/tasks' endpoint.

2017-06-28 Thread Quinn Leng


> On June 28, 2017, 11:31 p.m., Greg Mann wrote:
> > src/tests/master_tests.cpp
> > Lines 3545-3547 (patched)
> > <https://reviews.apache.org/r/60107/diff/7/?file=1766587#file1766587line3546>
> >
> > We want to assert that both of these tasks are there. Should do
> > 
> > ```
> > ASSERT_TRUE(value->contains(expected1.get()));
> > ASSERT_TRUE(value->contains(expected2.get()));
> > ```

In this case, expected1 and expected2 are not two tasks, they are two possible 
ordering of tasks, each of them contains two tasks, you can see that from the 
content they contain


> On June 28, 2017, 11:31 p.m., Greg Mann wrote:
> > src/tests/master_tests.cpp
> > Lines 3569-3571 (patched)
> > <https://reviews.apache.org/r/60107/diff/7/?file=1766587#file1766587line3570>
> >
> > You already assert that `taskArray.isSome()` above, so no need for this 
> > conditional.
> > 
> > Also, you can use the `->` operator:
> > 
> > ```
> > EXPECT_TRUE(taskArray->values.size() == 1);
> > ```

taskArray.isSome() is to avoid it's null, but the EXPECT_TRUE check it's size 
is 1, does that make sense?


- Quinn


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


On June 29, 2017, 12:39 a.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60107/
> ---
> 
> (Updated June 29, 2017, 12:39 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and 
> Vinod Kone.
> 
> 
> Bugs: MESOS-7630
> https://issues.apache.org/jira/browse/MESOS-7630
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added filtering to the '/tasks' endpoint.
> 
> 
> Diffs
> -
> 
>   src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
>   src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
>   src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
>   src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 
> 
> 
> Diff: https://reviews.apache.org/r/60107/diff/8/
> 
> 
> Testing
> ---
> 
> Passed "make check"
> Passed "GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48"
> Passed "GLOG_v=1 ./bin/mesos-tests.sh 
> --gtest_filter="MasterTest.TasksEndpoint" --gtest_repeat=1000 
> --gtest_break_on_failure"
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Re: Review Request 60107: Added filtering to the '/tasks' endpoint.

2017-06-28 Thread Quinn Leng

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

(Updated June 29, 2017, 12:39 a.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Added filtering to the '/tasks' endpoint.


Diffs (updated)
-

  src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
  src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
  src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
  src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 


Diff: https://reviews.apache.org/r/60107/diff/8/

Changes: https://reviews.apache.org/r/60107/diff/7-8/


Testing
---

Passed "make check"
Passed "GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48"
Passed "GLOG_v=1 ./bin/mesos-tests.sh --gtest_filter="MasterTest.TasksEndpoint" 
--gtest_repeat=1000 --gtest_break_on_failure"


Thanks,

Quinn Leng



Re: Review Request 60107: Added filtering to the '/tasks' endpoint.

2017-06-28 Thread Quinn Leng

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

(Updated June 28, 2017, 10:05 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


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


Repository: mesos


Description
---

Added filtering to the '/tasks' endpoint.


Diffs (updated)
-

  src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
  src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
  src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
  src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 


Diff: https://reviews.apache.org/r/60107/diff/7/

Changes: https://reviews.apache.org/r/60107/diff/6-7/


Testing
---

Passed "make check"
Passed "GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48"
Passed "GLOG_v=1 ./bin/mesos-tests.sh --gtest_filter="MasterTest.TasksEndpoint" 
--gtest_repeat=1000 --gtest_break_on_failure"


Thanks,

Quinn Leng



Re: Review Request 60107: Added filtering to the '/tasks' endpoint.

2017-06-28 Thread Quinn Leng

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

(Updated June 28, 2017, 9:38 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


Summary (updated)
-

Added filtering to the '/tasks' endpoint.


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


Repository: mesos


Description (updated)
---

Added filtering to the '/tasks' endpoint.


Diffs (updated)
-

  src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
  src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
  src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
  src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 


Diff: https://reviews.apache.org/r/60107/diff/6/

Changes: https://reviews.apache.org/r/60107/diff/5-6/


Testing
---

Passed "make check"
Passed "GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48"
Passed "GLOG_v=1 ./bin/mesos-tests.sh --gtest_filter="MasterTest.TasksEndpoint" 
--gtest_repeat=1000 --gtest_break_on_failure"


Thanks,

Quinn Leng



Re: Review Request 60107: Finished object acceptor for tasks endpoint.

2017-06-28 Thread Quinn Leng


> On June 28, 2017, 7:05 p.m., Greg Mann wrote:
> > src/common/http.hpp
> > Lines 205-218 (patched)
> > <https://reviews.apache.org/r/60107/diff/5/?file=1764406#file1764406line205>
> >
> > It doesn't look like this class is used at all in this patch, can we 
> > remove it?

I am creating AuthorizeAcceptors according to these functions 
"approveViewXXX()", it seems that the TaskInfo function is not used in the 
endpoint handler. I'll remvoe it.


> On June 28, 2017, 7:05 p.m., Greg Mann wrote:
> > src/common/http.hpp
> > Lines 228-229 (patched)
> > <https://reviews.apache.org/r/60107/diff/5/?file=1764406#file1764406line228>
> >
> > Should break after parentheses:
> > 
> > ```
> > bool accept(
> > const Task& task,
> > ```

Even if there are only two parameters?


- Quinn


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


On June 27, 2017, 10:30 p.m., Quinn Leng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60107/
> ---
> 
> (Updated June 27, 2017, 10:30 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and 
> Vinod Kone.
> 
> 
> Bugs: MESOS-7630
> https://issues.apache.org/jira/browse/MESOS-7630
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Finished object acceptor for "/tasks" endpoint.
> 
> Added the query parameter support for that endpoint.
> To query a task, you have to specify both framework_id
> and task_id. Thus the query would look like
> "/tasks?framework_id=[framework id];task_id=[task id]"
> 
> 
> Diffs
> -
> 
>   src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
>   src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
>   src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
>   src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 
> 
> 
> Diff: https://reviews.apache.org/r/60107/diff/5/
> 
> 
> Testing
> ---
> 
> Passed "make check"
> Passed "GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48"
> Passed "GLOG_v=1 ./bin/mesos-tests.sh 
> --gtest_filter="MasterTest.TasksEndpoint" --gtest_repeat=1000 
> --gtest_break_on_failure"
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>



Re: Review Request 60107: Finished object acceptor for tasks endpoint.

2017-06-27 Thread Quinn Leng

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

(Updated June 27, 2017, 10:30 p.m.)


Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod 
Kone.


Summary (updated)
-

Finished object acceptor for tasks endpoint.


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


Repository: mesos


Description (updated)
---

Finished object acceptor for "/tasks" endpoint.

Added the query parameter support for that endpoint.
To query a task, you have to specify both framework_id
and task_id. Thus the query would look like
"/tasks?framework_id=[framework id];task_id=[task id]"


Diffs (updated)
-

  src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
  src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
  src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
  src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 


Diff: https://reviews.apache.org/r/60107/diff/5/

Changes: https://reviews.apache.org/r/60107/diff/4-5/


Testing (updated)
---

Passed "make check"
Passed "GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48"
Passed "GLOG_v=1 ./bin/mesos-tests.sh --gtest_filter="MasterTest.TasksEndpoint" 
--gtest_repeat=1000 --gtest_break_on_failure"


Thanks,

Quinn Leng



  1   2   >