You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Jie Yu <yu...@gmail.com> on 2014/06/05 00:29:40 UTC
Review Request 22248: Allowed parsing JSON array flags.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22248/
-----------------------------------------------------------
Review request for mesos, Ben Mahler and Vinod Kone.
Repository: mesos-git
Description
-------
See summary. I did try to use enable_if to make 'parse' more generic to all JSON values, but its more complicated than I thought. The main reason is because we use lambda::bind(&parse<T>, ...) in 'add(...)' function. The compiler is not quite smart enough to figure out the right overload when doing 'lambda::bind'.
Diffs
-----
3rdparty/libprocess/3rdparty/stout/include/stout/flags/parse.hpp 1209469
3rdparty/libprocess/3rdparty/stout/tests/flags_tests.cpp 3b60ff8
Diff: https://reviews.apache.org/r/22248/diff/
Testing
-------
make check
Thanks,
Jie Yu
Re: Review Request 22248: Allowed parsing JSON array flags.
Posted by Jie Yu <yu...@gmail.com>.
> On June 4, 2014, 10:32 p.m., Ben Mahler wrote:
> > What was the motivation for this patch?
The port mapping isolator will pass an array of port ranges (in JSON array) to the launcher to execute it a subprocess (using the new Operation interface).
- Jie
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22248/#review44766
-----------------------------------------------------------
On June 4, 2014, 10:29 p.m., Jie Yu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22248/
> -----------------------------------------------------------
>
> (Updated June 4, 2014, 10:29 p.m.)
>
>
> Review request for mesos, Ben Mahler and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> See summary. I did try to use enable_if to make 'parse' more generic to all JSON values, but its more complicated than I thought. The main reason is because we use lambda::bind(&parse<T>, ...) in 'add(...)' function. The compiler is not quite smart enough to figure out the right overload when doing 'lambda::bind'.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/3rdparty/stout/include/stout/flags/parse.hpp 1209469
> 3rdparty/libprocess/3rdparty/stout/tests/flags_tests.cpp 3b60ff8
>
> Diff: https://reviews.apache.org/r/22248/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Jie Yu
>
>
Re: Review Request 22248: Allowed parsing JSON array flags.
Posted by Jie Yu <yu...@gmail.com>.
> On June 4, 2014, 10:32 p.m., Ben Mahler wrote:
> > What was the motivation for this patch?
>
> Jie Yu wrote:
> The port mapping isolator will pass an array of port ranges (in JSON array) to the launcher to execute it a subprocess (using the new Operation interface).
OK, figured out a even cleaner solution. Ignore this patch.
- Jie
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22248/#review44766
-----------------------------------------------------------
On June 4, 2014, 10:29 p.m., Jie Yu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22248/
> -----------------------------------------------------------
>
> (Updated June 4, 2014, 10:29 p.m.)
>
>
> Review request for mesos, Ben Mahler and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> See summary. I did try to use enable_if to make 'parse' more generic to all JSON values, but its more complicated than I thought. The main reason is because we use lambda::bind(&parse<T>, ...) in 'add(...)' function. The compiler is not quite smart enough to figure out the right overload when doing 'lambda::bind'.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/3rdparty/stout/include/stout/flags/parse.hpp 1209469
> 3rdparty/libprocess/3rdparty/stout/tests/flags_tests.cpp 3b60ff8
>
> Diff: https://reviews.apache.org/r/22248/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Jie Yu
>
>
Re: Review Request 22248: Allowed parsing JSON array flags.
Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22248/#review44766
-----------------------------------------------------------
What was the motivation for this patch?
- Ben Mahler
On June 4, 2014, 10:29 p.m., Jie Yu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22248/
> -----------------------------------------------------------
>
> (Updated June 4, 2014, 10:29 p.m.)
>
>
> Review request for mesos, Ben Mahler and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> See summary. I did try to use enable_if to make 'parse' more generic to all JSON values, but its more complicated than I thought. The main reason is because we use lambda::bind(&parse<T>, ...) in 'add(...)' function. The compiler is not quite smart enough to figure out the right overload when doing 'lambda::bind'.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/3rdparty/stout/include/stout/flags/parse.hpp 1209469
> 3rdparty/libprocess/3rdparty/stout/tests/flags_tests.cpp 3b60ff8
>
> Diff: https://reviews.apache.org/r/22248/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Jie Yu
>
>