You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Niklas Nielsen <ni...@qni.dk> on 2013/11/18 20:25:55 UTC

Re: Review Request 15540: Added master/tasks.json endpoint.

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

(Updated Nov. 18, 2013, 7:25 p.m.)


Review request for mesos, Benjamin Hindman, Ben Mahler, and Ross Allen.


Repository: mesos-git


Description
-------

This patch lists all running and recent completed tasks, sorted by date
and starting at offset and limited by limit parameter.


Diffs (updated)
-----

  src/master/http.cpp deb5c97 
  src/master/master.hpp e377af8 
  src/master/master.cpp abab6ce 

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


Testing
-------

make check and functional testing


Thanks,

Niklas Nielsen


Re: Review Request 15540: Added master/tasks.json endpoint.

Posted by Benjamin Hindman <be...@gmail.com>.
No objections!


> On Dec 4, 2013, at 2:42 PM, "Niklas Nielsen" <ni...@qni.dk> wrote:
> 
> 
> 
>>> On Dec. 2, 2013, 5:26 p.m., Benjamin Hindman wrote:
>>> Ship It!
> 
> I'll go ahead and commit this too if you have no further objections :)
> 
> 
> - Niklas
> 
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15540/#review29594
> -----------------------------------------------------------
> 
> 
>> On Nov. 26, 2013, 6 a.m., Niklas Nielsen wrote:
>> 
>> -----------------------------------------------------------
>> This is an automatically generated e-mail. To reply, visit:
>> https://reviews.apache.org/r/15540/
>> -----------------------------------------------------------
>> 
>> (Updated Nov. 26, 2013, 6 a.m.)
>> 
>> 
>> Review request for mesos, Benjamin Hindman, Ben Mahler, and Ross Allen.
>> 
>> 
>> Repository: mesos-git
>> 
>> 
>> Description
>> -------
>> 
>> This patch lists all running and recent completed tasks, sorted by date
>> and starting at offset and limited by limit parameter.
>> 
>> 
>> Diffs
>> -----
>> 
>>  src/master/constants.hpp 634067a 
>>  src/master/constants.cpp 4475a0d 
>>  src/master/http.cpp 218906a 
>>  src/master/master.hpp 2d5dfaf 
>>  src/master/master.cpp f13d2a0 
>> 
>> Diff: https://reviews.apache.org/r/15540/diff/
>> 
>> 
>> Testing
>> -------
>> 
>> make check and functional testing
>> 
>> 
>> Thanks,
>> 
>> Niklas Nielsen
> 

Re: Review Request 15540: Added master/tasks.json endpoint.

Posted by Niklas Nielsen <ni...@qni.dk>.

> On Dec. 2, 2013, 5:26 p.m., Benjamin Hindman wrote:
> > Ship It!

I'll go ahead and commit this too if you have no further objections :)


- Niklas


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


On Nov. 26, 2013, 6 a.m., Niklas Nielsen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15540/
> -----------------------------------------------------------
> 
> (Updated Nov. 26, 2013, 6 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Ross Allen.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> This patch lists all running and recent completed tasks, sorted by date
> and starting at offset and limited by limit parameter.
> 
> 
> Diffs
> -----
> 
>   src/master/constants.hpp 634067a 
>   src/master/constants.cpp 4475a0d 
>   src/master/http.cpp 218906a 
>   src/master/master.hpp 2d5dfaf 
>   src/master/master.cpp f13d2a0 
> 
> Diff: https://reviews.apache.org/r/15540/diff/
> 
> 
> Testing
> -------
> 
> make check and functional testing
> 
> 
> Thanks,
> 
> Niklas Nielsen
> 
>


Re: Review Request 15540: Added master/tasks.json endpoint.

Posted by Benjamin Hindman <be...@berkeley.edu>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15540/#review29594
-----------------------------------------------------------

Ship it!


Ship It!

- Benjamin Hindman


On Nov. 26, 2013, 6 a.m., Niklas Nielsen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15540/
> -----------------------------------------------------------
> 
> (Updated Nov. 26, 2013, 6 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Ross Allen.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> This patch lists all running and recent completed tasks, sorted by date
> and starting at offset and limited by limit parameter.
> 
> 
> Diffs
> -----
> 
>   src/master/constants.hpp 634067a 
>   src/master/constants.cpp 4475a0d 
>   src/master/http.cpp 218906a 
>   src/master/master.hpp 2d5dfaf 
>   src/master/master.cpp f13d2a0 
> 
> Diff: https://reviews.apache.org/r/15540/diff/
> 
> 
> Testing
> -------
> 
> make check and functional testing
> 
> 
> Thanks,
> 
> Niklas Nielsen
> 
>


Re: Review Request 15540: Added master/tasks.json endpoint.

Posted by Niklas Nielsen <ni...@qni.dk>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15540/
-----------------------------------------------------------

(Updated Nov. 26, 2013, 6 a.m.)


Review request for mesos, Benjamin Hindman, Ben Mahler, and Ross Allen.


Changes
-------

Addressed Ben's comments


Repository: mesos-git


Description
-------

This patch lists all running and recent completed tasks, sorted by date
and starting at offset and limited by limit parameter.


Diffs (updated)
-----

  src/master/constants.hpp 634067a 
  src/master/constants.cpp 4475a0d 
  src/master/http.cpp 218906a 
  src/master/master.hpp 2d5dfaf 
  src/master/master.cpp f13d2a0 

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


Testing
-------

make check and functional testing


Thanks,

Niklas Nielsen


Re: Review Request 15540: Added master/tasks.json endpoint.

Posted by Niklas Nielsen <ni...@qni.dk>.

> On Nov. 25, 2013, 12:58 a.m., Benjamin Hindman wrote:
> >

Awesome! Great points and thanks for the pointers on Result<>


- Niklas


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


On Nov. 26, 2013, 6 a.m., Niklas Nielsen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15540/
> -----------------------------------------------------------
> 
> (Updated Nov. 26, 2013, 6 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Ross Allen.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> This patch lists all running and recent completed tasks, sorted by date
> and starting at offset and limited by limit parameter.
> 
> 
> Diffs
> -----
> 
>   src/master/constants.hpp 634067a 
>   src/master/constants.cpp 4475a0d 
>   src/master/http.cpp 218906a 
>   src/master/master.hpp 2d5dfaf 
>   src/master/master.cpp f13d2a0 
> 
> Diff: https://reviews.apache.org/r/15540/diff/
> 
> 
> Testing
> -------
> 
> make check and functional testing
> 
> 
> Thanks,
> 
> Niklas Nielsen
> 
>


Re: Review Request 15540: Added master/tasks.json endpoint.

Posted by Benjamin Hindman <be...@berkeley.edu>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15540/#review29345
-----------------------------------------------------------



src/master/http.cpp
<https://reviews.apache.org/r/15540/#comment56529>

    Maybe instead of saying 'running and completed tasks' we just say 'tasks'? Likewise, s/all active// since this is for completed frameworks too right?



src/master/http.cpp
<https://reviews.apache.org/r/15540/#comment56530>

    Again, I think we should just say 'tasks', and if we get specific say 'Lists known tasks.'.



src/master/http.cpp
<https://reviews.apache.org/r/15540/#comment56531>

    Please use markdown here (i.e., '>' not <pre>). See TOGGLE_HELP in libprocess/src/process.cpp for an example.



src/master/http.cpp
<https://reviews.apache.org/r/15540/#comment56532>

    Please put '{' on newline.



src/master/http.cpp
<https://reviews.apache.org/r/15540/#comment56533>

    Please put '{' on newline! ;)



src/master/http.cpp
<https://reviews.apache.org/r/15540/#comment56534>

    It's fine to be pedantic, but it should always be the case that the statuses are in order and the tail of the list should be the latest timestamp and the head of the list should be the earliest timestamp so we might as well simplify this (and even put a CHECK in place if you'd like to confirm).



src/master/http.cpp
<https://reviews.apache.org/r/15540/#comment56535>

    {



src/master/http.cpp
<https://reviews.apache.org/r/15540/#comment56537>

    This can just be:
    
    return lhs->statuses(0) < rhs->statuses(0);



src/master/http.cpp
<https://reviews.apache.org/r/15540/#comment56536>

    {



src/master/http.cpp
<https://reviews.apache.org/r/15540/#comment56538>

    Result<int> result = numify<int>(request.query.get("limit"));
    
    // Do you want to return an error if they gave you bad input? At the very least maybe a TODO?
    
    size_t limit = result.isSome() ? result.get() : defaultTasksLimit;
    



src/master/http.cpp
<https://reviews.apache.org/r/15540/#comment56539>

    You can cleanup this like the suggestion above too (can even reuse the 'result' variable). 



src/master/http.cpp
<https://reviews.apache.org/r/15540/#comment56540>

    s/orderString/order/



src/master/master.hpp
<https://reviews.apache.org/r/15540/#comment56541>

    This should be in src/master/constants.hpp and be in all caps. Also, no need to say 'default' since that's what most of our constants are (see examples in constants.hpp).


- Benjamin Hindman


On Nov. 18, 2013, 7:26 p.m., Niklas Nielsen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15540/
> -----------------------------------------------------------
> 
> (Updated Nov. 18, 2013, 7:26 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Ross Allen.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> This patch lists all running and recent completed tasks, sorted by date
> and starting at offset and limited by limit parameter.
> 
> 
> Diffs
> -----
> 
>   src/master/http.cpp deb5c97 
>   src/master/master.hpp e377af8 
>   src/master/master.cpp abab6ce 
> 
> Diff: https://reviews.apache.org/r/15540/diff/
> 
> 
> Testing
> -------
> 
> make check and functional testing
> 
> 
> Thanks,
> 
> Niklas Nielsen
> 
>


Re: Review Request 15540: Added master/tasks.json endpoint.

Posted by Niklas Nielsen <ni...@qni.dk>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15540/
-----------------------------------------------------------

(Updated Nov. 18, 2013, 7:26 p.m.)


Review request for mesos, Benjamin Hindman, Ben Mahler, and Ross Allen.


Repository: mesos-git


Description
-------

This patch lists all running and recent completed tasks, sorted by date
and starting at offset and limited by limit parameter.


Diffs
-----

  src/master/http.cpp deb5c97 
  src/master/master.hpp e377af8 
  src/master/master.cpp abab6ce 

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


Testing
-------

make check and functional testing


Thanks,

Niklas Nielsen