You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Benno Evers <be...@mesosphere.com> on 2019/03/21 10:57:55 UTC
Review Request 70262: Added a new 'iterable_queue' template to stout.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70262/
-----------------------------------------------------------
Review request for mesos, Benjamin Bannier, Benjamin Mahler, and Joseph Wu.
Repository: mesos
Description
-------
This template exposes the iterator interface to a `std::queue`s
underlying container.
The motivation for this is so it can be used in the `received()`
callback of Mesos framework using the v1 API, to allow iterating
over all received events.
Diffs
-----
3rdparty/stout/include/stout/iterable_queue.hpp PRE-CREATION
Diff: https://reviews.apache.org/r/70262/diff/1/
Testing
-------
Will add a unit test if we have consensus to move forward with adding this.
Thanks,
Benno Evers
Re: Review Request 70262: Added a new 'iterable_queue' template to
stout.
Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70262/#review213890
-----------------------------------------------------------
So besides changing the callback signature from this:
```
void received(queue<Event> events)
{
while (!events.empty()) {
Event event = events.front();
events.pop();
...
}
}
```
To something like this:
```
void received(iterable_queue<Event> events)
{
foreach (const Event event&, events) {
...
}
}
```
What are the benefits of allowing iteration? Are there events we expect to receive in batches? Or some benefit to looking forward?
- Joseph Wu
On March 21, 2019, 3:57 a.m., Benno Evers wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70262/
> -----------------------------------------------------------
>
> (Updated March 21, 2019, 3:57 a.m.)
>
>
> Review request for mesos, Benjamin Bannier, Benjamin Mahler, and Joseph Wu.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This template exposes the iterator interface to a `std::queue`s
> underlying container.
>
> The motivation for this is so it can be used in the `received()`
> callback of Mesos framework using the v1 API, to allow iterating
> over all received events.
>
>
> Diffs
> -----
>
> 3rdparty/stout/include/stout/iterable_queue.hpp PRE-CREATION
>
>
> Diff: https://reviews.apache.org/r/70262/diff/1/
>
>
> Testing
> -------
>
> Will add a unit test if we have consensus to move forward with adding this.
>
>
> Thanks,
>
> Benno Evers
>
>
Re: Review Request 70262: Added a new 'iterable_queue' template to
stout.
Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70262/#review213880
-----------------------------------------------------------
PASS: Mesos patch 70262 was successfully built and tested.
Reviews applied: `['70262']`
All the build artifacts available at: http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2989/mesos-review-70262
- Mesos Reviewbot Windows
On March 21, 2019, 10:57 a.m., Benno Evers wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70262/
> -----------------------------------------------------------
>
> (Updated March 21, 2019, 10:57 a.m.)
>
>
> Review request for mesos, Benjamin Bannier, Benjamin Mahler, and Joseph Wu.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This template exposes the iterator interface to a `std::queue`s
> underlying container.
>
> The motivation for this is so it can be used in the `received()`
> callback of Mesos framework using the v1 API, to allow iterating
> over all received events.
>
>
> Diffs
> -----
>
> 3rdparty/stout/include/stout/iterable_queue.hpp PRE-CREATION
>
>
> Diff: https://reviews.apache.org/r/70262/diff/1/
>
>
> Testing
> -------
>
> Will add a unit test if we have consensus to move forward with adding this.
>
>
> Thanks,
>
> Benno Evers
>
>
Re: Review Request 70262: Added a new 'iterable_queue' template to
stout.
Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70262/#review213881
-----------------------------------------------------------
Patch looks great!
Reviews applied: [70262]
Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers --disable-parallel-test-execution' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh
- Mesos Reviewbot
On March 21, 2019, 3:57 a.m., Benno Evers wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70262/
> -----------------------------------------------------------
>
> (Updated March 21, 2019, 3:57 a.m.)
>
>
> Review request for mesos, Benjamin Bannier, Benjamin Mahler, and Joseph Wu.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This template exposes the iterator interface to a `std::queue`s
> underlying container.
>
> The motivation for this is so it can be used in the `received()`
> callback of Mesos framework using the v1 API, to allow iterating
> over all received events.
>
>
> Diffs
> -----
>
> 3rdparty/stout/include/stout/iterable_queue.hpp PRE-CREATION
>
>
> Diff: https://reviews.apache.org/r/70262/diff/1/
>
>
> Testing
> -------
>
> Will add a unit test if we have consensus to move forward with adding this.
>
>
> Thanks,
>
> Benno Evers
>
>