You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Guangya Liu <gy...@gmail.com> on 2016/02/10 14:37:37 UTC
Re: Review Request 39968: Enabled http endpoint include nested paths.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39968/
-----------------------------------------------------------
(Updated 二月 10, 2016, 1:37 p.m.)
Review request for mesos and Ben Mahler.
Summary (updated)
-----------------
Enabled http endpoint include nested paths.
Bugs: MESOS-3833
https://issues.apache.org/jira/browse/MESOS-3833
Repository: mesos
Description (updated)
-------
Enabled http endpoint include nested paths.
Diffs (updated)
-----
3rdparty/libprocess/src/help.cpp be3f7b74d92bd0626d111fd4ddd4cacd74e36e68
Diff: https://reviews.apache.org/r/39968/diff/
Testing (updated)
-------
LiuGuangyas-MacBook-Pro:~ gyliu$ curl "http://192.168.0.100:5050/help/master/api/v1/scheduler"
### USAGE ###
> /master/api/v1/scheduler
### TL;DR; ###
Endpoint for schedulers to make Calls against the master.
### DESCRIPTION ###
Returns 202 Accepted iff the request is accepted.
Thanks,
Guangya Liu
Re: Review Request 39968: Enabled http endpoint include nested paths.
Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39968/#review118671
-----------------------------------------------------------
3rdparty/libprocess/src/help.cpp (lines 170 - 187)
<https://reviews.apache.org/r/39968/#comment179969>
Please extend the existing HTTPTest.EndpointsHelp to also ensure that help requests with names containing a slash also function correctly.
3rdparty/libprocess/src/help.cpp (line 174)
<https://reviews.apache.org/r/39968/#comment179970>
This `api/v1/scheduler` example looks like a mesos endpoint and it doesn't seem necessary here, let's just omit it since this is libprocess. So:
```
// Path format of the url: /help/<id>[/<name>].
// Note that <name> may contain slashes.
```
3rdparty/libprocess/src/help.cpp (lines 175 - 176)
<https://reviews.apache.org/r/39968/#comment179971>
My previous suggestion was to continue to use strings::tokenize, but to add a parameter to specify the maximum number of tokens to return. So no need to trim:
```
vector<string> tokens = strings::tokenize(request.url.path, "/", 3);
```
You'll need to add another patch that implements the TODO here:
https://github.com/apache/mesos/blob/master/3rdparty/libprocess/3rdparty/stout/include/stout/strings.hpp#L134-L135
- Ben Mahler
On Feb. 10, 2016, 1:37 p.m., Guangya Liu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39968/
> -----------------------------------------------------------
>
> (Updated Feb. 10, 2016, 1:37 p.m.)
>
>
> Review request for mesos and Ben Mahler.
>
>
> Bugs: MESOS-3833
> https://issues.apache.org/jira/browse/MESOS-3833
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Enabled http endpoint include nested paths.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/src/help.cpp be3f7b74d92bd0626d111fd4ddd4cacd74e36e68
>
> Diff: https://reviews.apache.org/r/39968/diff/
>
>
> Testing
> -------
>
> LiuGuangyas-MacBook-Pro:~ gyliu$ curl "http://192.168.0.100:5050/help/master/api/v1/scheduler"
> ### USAGE ###
> > /master/api/v1/scheduler
>
> ### TL;DR; ###
> Endpoint for schedulers to make Calls against the master.
>
> ### DESCRIPTION ###
> Returns 202 Accepted iff the request is accepted.
>
>
> Thanks,
>
> Guangya Liu
>
>
Re: Review Request 39968: Enabled http endpoint include nested paths.
Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39968/#review118727
-----------------------------------------------------------
Patch looks great!
Reviews applied: [39968]
Passed command: export OS='ubuntu:14.04' CONFIGURATION='--verbose' COMPILER='gcc' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh
- Mesos ReviewBot
On Feb. 10, 2016, 1:37 p.m., Guangya Liu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39968/
> -----------------------------------------------------------
>
> (Updated Feb. 10, 2016, 1:37 p.m.)
>
>
> Review request for mesos and Ben Mahler.
>
>
> Bugs: MESOS-3833
> https://issues.apache.org/jira/browse/MESOS-3833
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Enabled http endpoint include nested paths.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/src/help.cpp be3f7b74d92bd0626d111fd4ddd4cacd74e36e68
>
> Diff: https://reviews.apache.org/r/39968/diff/
>
>
> Testing
> -------
>
> LiuGuangyas-MacBook-Pro:~ gyliu$ curl "http://192.168.0.100:5050/help/master/api/v1/scheduler"
> ### USAGE ###
> > /master/api/v1/scheduler
>
> ### TL;DR; ###
> Endpoint for schedulers to make Calls against the master.
>
> ### DESCRIPTION ###
> Returns 202 Accepted iff the request is accepted.
>
>
> Thanks,
>
> Guangya Liu
>
>
Re: Review Request 39968: Enabled http endpoint include nested paths.
Posted by haosdent huang <ha...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39968/#review118819
-----------------------------------------------------------
Ship it!
Ship It!
- haosdent huang
On Feb. 11, 2016, 5:37 a.m., Guangya Liu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39968/
> -----------------------------------------------------------
>
> (Updated Feb. 11, 2016, 5:37 a.m.)
>
>
> Review request for mesos and Ben Mahler.
>
>
> Bugs: MESOS-3833
> https://issues.apache.org/jira/browse/MESOS-3833
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Enabled http endpoint include nested paths.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/src/help.cpp be3f7b74d92bd0626d111fd4ddd4cacd74e36e68
> 3rdparty/libprocess/src/tests/http_tests.cpp 410551cd4bda145bc491c46b1c64e6ed14fb4f13
>
> Diff: https://reviews.apache.org/r/39968/diff/
>
>
> Testing
> -------
>
> LiuGuangyas-MacBook-Pro:~ gyliu$ curl "http://192.168.0.100:5050/help/master/api/v1/scheduler"
> ### USAGE ###
> > /master/api/v1/scheduler
>
> ### TL;DR; ###
> Endpoint for schedulers to make Calls against the master.
>
> ### DESCRIPTION ###
> Returns 202 Accepted iff the request is accepted.
>
>
> Thanks,
>
> Guangya Liu
>
>
Re: Review Request 39968: Enabled http endpoint include nested paths.
Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39968/#review118990
-----------------------------------------------------------
Ship it!
3rdparty/libprocess/src/tests/http_tests.cpp (lines 240 - 251)
<https://reviews.apache.org/r/39968/#comment180288>
Thanks!
- Ben Mahler
On Feb. 11, 2016, 5:37 a.m., Guangya Liu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39968/
> -----------------------------------------------------------
>
> (Updated Feb. 11, 2016, 5:37 a.m.)
>
>
> Review request for mesos and Ben Mahler.
>
>
> Bugs: MESOS-3833
> https://issues.apache.org/jira/browse/MESOS-3833
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Enabled http endpoint include nested paths.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/src/help.cpp be3f7b74d92bd0626d111fd4ddd4cacd74e36e68
> 3rdparty/libprocess/src/tests/http_tests.cpp 410551cd4bda145bc491c46b1c64e6ed14fb4f13
>
> Diff: https://reviews.apache.org/r/39968/diff/
>
>
> Testing
> -------
>
> LiuGuangyas-MacBook-Pro:~ gyliu$ curl "http://192.168.0.100:5050/help/master/api/v1/scheduler"
> ### USAGE ###
> > /master/api/v1/scheduler
>
> ### TL;DR; ###
> Endpoint for schedulers to make Calls against the master.
>
> ### DESCRIPTION ###
> Returns 202 Accepted iff the request is accepted.
>
>
> Thanks,
>
> Guangya Liu
>
>
Re: Review Request 39968: Enabled http endpoint include nested paths.
Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39968/#review118838
-----------------------------------------------------------
Patch looks great!
Reviews applied: [43469, 39968]
Passed command: export OS='ubuntu:14.04' CONFIGURATION='--verbose' COMPILER='gcc' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh
- Mesos ReviewBot
On Feb. 11, 2016, 5:37 a.m., Guangya Liu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39968/
> -----------------------------------------------------------
>
> (Updated Feb. 11, 2016, 5:37 a.m.)
>
>
> Review request for mesos and Ben Mahler.
>
>
> Bugs: MESOS-3833
> https://issues.apache.org/jira/browse/MESOS-3833
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Enabled http endpoint include nested paths.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/src/help.cpp be3f7b74d92bd0626d111fd4ddd4cacd74e36e68
> 3rdparty/libprocess/src/tests/http_tests.cpp 410551cd4bda145bc491c46b1c64e6ed14fb4f13
>
> Diff: https://reviews.apache.org/r/39968/diff/
>
>
> Testing
> -------
>
> LiuGuangyas-MacBook-Pro:~ gyliu$ curl "http://192.168.0.100:5050/help/master/api/v1/scheduler"
> ### USAGE ###
> > /master/api/v1/scheduler
>
> ### TL;DR; ###
> Endpoint for schedulers to make Calls against the master.
>
> ### DESCRIPTION ###
> Returns 202 Accepted iff the request is accepted.
>
>
> Thanks,
>
> Guangya Liu
>
>
Re: Review Request 39968: Enabled http endpoint include nested paths.
Posted by Guangya Liu <gy...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39968/
-----------------------------------------------------------
(Updated 二月 11, 2016, 5:37 a.m.)
Review request for mesos and Ben Mahler.
Bugs: MESOS-3833
https://issues.apache.org/jira/browse/MESOS-3833
Repository: mesos
Description
-------
Enabled http endpoint include nested paths.
Diffs (updated)
-----
3rdparty/libprocess/src/help.cpp be3f7b74d92bd0626d111fd4ddd4cacd74e36e68
3rdparty/libprocess/src/tests/http_tests.cpp 410551cd4bda145bc491c46b1c64e6ed14fb4f13
Diff: https://reviews.apache.org/r/39968/diff/
Testing
-------
LiuGuangyas-MacBook-Pro:~ gyliu$ curl "http://192.168.0.100:5050/help/master/api/v1/scheduler"
### USAGE ###
> /master/api/v1/scheduler
### TL;DR; ###
Endpoint for schedulers to make Calls against the master.
### DESCRIPTION ###
Returns 202 Accepted iff the request is accepted.
Thanks,
Guangya Liu