Re: Review Request 41168: Logger Module: Add ContainerLogger support to the MesosTest helpers

2015-12-20 Thread Benjamin Hindman

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



src/tests/mesos.hpp (line 152)


Then why not return this as Owned? Capturing this requirement as a comment 
is brittle and prone to bugs.

Also, it's clear you've got a global invariant that you're trying to 
comment on here, in particular, that when someone calls `CreateContainerLogger` 
that container logger will get passed into a (some? which?) containerizer which 
will be responsible for cleaning it up! But as a generic `MesosTest` function 
why can I not just call `CreateContainerLogger` at any point and _not_ pass it 
into a containerzer? Then does this comment still apply?

While we could just clean up the comment (i.e., "the caller owns the 
returned pointer and must clean it up"), by returning an `Owned` no comment is 
necessary!

Note that the one place where we make exceptions to this rule is factory 
functions, like `ContainerLogger::create`, but even there I'd love to see a 
world where we use `Owned`.


- Benjamin Hindman


On Dec. 15, 2015, 8:40 p.m., Joseph Wu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41168/
> ---
> 
> (Updated Dec. 15, 2015, 8:40 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Artem Harutyunyan.
> 
> 
> Bugs: MESOS-4088
> https://issues.apache.org/jira/browse/MESOS-4088
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Adds a helper that creates and initializes the `ContainerLogger`.  This is 
> used in some tests that use test-only containerizer constructors.
> 
> 
> Diffs
> -
> 
>   src/tests/mesos.hpp 689efb40dc22337766b624218d2504d5de3e5cd8 
>   src/tests/mesos.cpp a501f04dfbf9c93c2196e83b512519e925a67c97 
> 
> Diff: https://reviews.apache.org/r/41168/diff/
> 
> 
> Testing
> ---
> 
> This will be tested later in the review chain.
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>



Re: Review Request 41168: Logger Module: Add ContainerLogger support to the MesosTest helpers

2015-12-15 Thread Joseph Wu

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

(Updated Dec. 15, 2015, 12:40 p.m.)


Review request for mesos, Benjamin Hindman and Artem Harutyunyan.


Changes
---

Moved `initialize` into `create`. Remove `options` in favor of module 
parameters.


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


Repository: mesos


Description
---

Adds a helper that creates and initializes the `ContainerLogger`.  This is used 
in some tests that use test-only containerizer constructors.


Diffs (updated)
-

  src/tests/mesos.hpp 689efb40dc22337766b624218d2504d5de3e5cd8 
  src/tests/mesos.cpp a501f04dfbf9c93c2196e83b512519e925a67c97 

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


Testing
---

This will be tested later in the review chain.


Thanks,

Joseph Wu



Re: Review Request 41168: Logger Module: Add ContainerLogger support to the MesosTest helpers

2015-12-14 Thread Joseph Wu

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

(Updated Dec. 14, 2015, 3:48 p.m.)


Review request for mesos, Benjamin Hindman and Artem Harutyunyan.


Changes
---

Remove some now-unneeded helpers.


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


Repository: mesos


Description (updated)
---

Adds a helper that creates and initializes the `ContainerLogger`.  This is used 
in some tests that use test-only containerizer constructors.


Diffs (updated)
-

  src/tests/mesos.hpp 689efb40dc22337766b624218d2504d5de3e5cd8 
  src/tests/mesos.cpp a501f04dfbf9c93c2196e83b512519e925a67c97 

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


Testing
---

This will be tested later in the review chain.


Thanks,

Joseph Wu



Re: Review Request 41168: Logger Module: Add ContainerLogger support to the MesosTest helpers

2015-12-11 Thread Joseph Wu

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

(Updated Dec. 11, 2015, 4:40 p.m.)


Review request for mesos, Benjamin Hindman and Artem Harutyunyan.


Changes
---

Rename from ExecutorLogger to ContainerLogger.


Summary (updated)
-

Logger Module: Add ContainerLogger support to the MesosTest helpers


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


Repository: mesos


Description (updated)
---

Adds a helper that creates and initializes the `ContainerLogger`.


Diffs (updated)
-

  src/tests/cluster.hpp 576dcb8b7e27d1905425aa0f7cb319c19c17c15c 
  src/tests/cluster.cpp 1a3a038e78999bca2fc3f08725f4ffaf4290bcb9 
  src/tests/mesos.hpp 2429ac5cbcd9c1a3949c11de94b542108a3c13d8 
  src/tests/mesos.cpp a501f04dfbf9c93c2196e83b512519e925a67c97 

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


Testing
---

This will be tested later in the review chain.


Thanks,

Joseph Wu