Re: Review Request 43075: Fixed error message when dropping a scheduler::Call message.

2016-02-02 Thread Vinod Kone


> On Feb. 2, 2016, 7:54 p.m., Vinod Kone wrote:
> > src/master/master.cpp, line 1801
> > 
> >
> > The output stream operator overload for Call (unversioned) defined in 
> > "mesos/scheduler/scheduler.hpp". Not sure why the compiler unable to find 
> > that overload (defined in `mesos` namespace).
> > 
> > It seems to work fine for log statements (that print v1::Call) in 
> > scheduler.cpp. The overload for v1::Call was defined in 
> > "mesos/include/mesos/v1/scheduler/scheduler.cpp" though, which is in the 
> > same namespace as the log statements in scheduler.cpp.
> 
> Neil Conway wrote:
> I _believe_ what is going on here is that the overload of `operator<<` 
> for `mesos::scheduler::Call::Type` is defined in the `mesos` namespace, not 
> the `mesos::scheduler` namespace. Since ADL only considers the "closest 
> enclosing namespace" of the argument (see 
> http://en.cppreference.com/w/cpp/language/adl , case 2(d)), it looks for an 
> overload in `mesos::scheduler` but not `mesos`.
> 
> Defining the overload of `operator<<` in `mesos::scheduler` seems to fix 
> the problem. I think it is generally good practice to group types and 
> functions on those types together into the same namespace, anyway. I'll 
> submit a revised RR doing that shortly.

Yup, that's what I figured out after reading SO. Just doing a `make check` to 
confirm.


- Vinod


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


On Feb. 2, 2016, 5:12 a.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43075/
> ---
> 
> (Updated Feb. 2, 2016, 5:12 a.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Old output: "Dropping 2 call from framework ..."
> 
> New output: "Dropping TEARDOWN call from framework ..."
> 
> 
> Diffs
> -
> 
>   src/master/master.cpp 98441a543611d4083b2495ee103f0ab5e2187e83 
> 
> Diff: https://reviews.apache.org/r/43075/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 43075: Fixed error message when dropping a scheduler::Call message.

2016-02-02 Thread Neil Conway


> On Feb. 2, 2016, 7:54 p.m., Vinod Kone wrote:
> > src/master/master.cpp, line 1801
> > 
> >
> > The output stream operator overload for Call (unversioned) defined in 
> > "mesos/scheduler/scheduler.hpp". Not sure why the compiler unable to find 
> > that overload (defined in `mesos` namespace).
> > 
> > It seems to work fine for log statements (that print v1::Call) in 
> > scheduler.cpp. The overload for v1::Call was defined in 
> > "mesos/include/mesos/v1/scheduler/scheduler.cpp" though, which is in the 
> > same namespace as the log statements in scheduler.cpp.

I _believe_ what is going on here is that the overload of `operator<<` for 
`mesos::scheduler::Call::Type` is defined in the `mesos` namespace, not the 
`mesos::scheduler` namespace. Since ADL only considers the "closest enclosing 
namespace" of the argument (see http://en.cppreference.com/w/cpp/language/adl , 
case 2(d)), it looks for an overload in `mesos::scheduler` but not `mesos`.

Defining the overload of `operator<<` in `mesos::scheduler` seems to fix the 
problem. I think it is generally good practice to group types and functions on 
those types together into the same namespace, anyway. I'll submit a revised RR 
doing that shortly.


- Neil


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


On Feb. 2, 2016, 5:12 a.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43075/
> ---
> 
> (Updated Feb. 2, 2016, 5:12 a.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Old output: "Dropping 2 call from framework ..."
> 
> New output: "Dropping TEARDOWN call from framework ..."
> 
> 
> Diffs
> -
> 
>   src/master/master.cpp 98441a543611d4083b2495ee103f0ab5e2187e83 
> 
> Diff: https://reviews.apache.org/r/43075/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 43075: Fixed error message when dropping a scheduler::Call message.

2016-02-02 Thread Vinod Kone

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




src/master/master.cpp (line 1801)


The output stream operator overload for Call (unversioned) defined in 
"mesos/scheduler/scheduler.hpp". Not sure why the compiler unable to find that 
overload (defined in `mesos` namespace).

It seems to work fine for log statements (that print v1::Call) in 
scheduler.cpp. The overload for v1::Call was defined in 
"mesos/include/mesos/v1/scheduler/scheduler.cpp" though, which is in the same 
namespace as the log statements in scheduler.cpp.


- Vinod Kone


On Feb. 2, 2016, 5:12 a.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43075/
> ---
> 
> (Updated Feb. 2, 2016, 5:12 a.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Old output: "Dropping 2 call from framework ..."
> 
> New output: "Dropping TEARDOWN call from framework ..."
> 
> 
> Diffs
> -
> 
>   src/master/master.cpp 98441a543611d4083b2495ee103f0ab5e2187e83 
> 
> Diff: https://reviews.apache.org/r/43075/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 43075: Fixed error message when dropping a scheduler::Call message.

2016-02-01 Thread Guangya Liu

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



I saw that there are still other places using the call.type() directly, can you 
please update those files as well? 

Such as the executor, the scheduler library etc.

- Guangya Liu


On 二月 2, 2016, 5:12 a.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43075/
> ---
> 
> (Updated 二月 2, 2016, 5:12 a.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Old output: "Dropping 2 call from framework ..."
> 
> New output: "Dropping TEARDOWN call from framework ..."
> 
> 
> Diffs
> -
> 
>   src/master/master.cpp 98441a543611d4083b2495ee103f0ab5e2187e83 
> 
> Diff: https://reviews.apache.org/r/43075/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 43075: Fixed error message when dropping a scheduler::Call message.

2016-02-01 Thread Mesos ReviewBot

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



Patch looks great!

Reviews applied: [43075]

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. 2, 2016, 5:12 a.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43075/
> ---
> 
> (Updated Feb. 2, 2016, 5:12 a.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Old output: "Dropping 2 call from framework ..."
> 
> New output: "Dropping TEARDOWN call from framework ..."
> 
> 
> Diffs
> -
> 
>   src/master/master.cpp 98441a543611d4083b2495ee103f0ab5e2187e83 
> 
> Diff: https://reviews.apache.org/r/43075/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 43075: Fixed error message when dropping a scheduler::Call message.

2016-02-01 Thread Guangya Liu

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


Ship it!




Ship It!

- Guangya Liu


On 二月 2, 2016, 5:12 a.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43075/
> ---
> 
> (Updated 二月 2, 2016, 5:12 a.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Old output: "Dropping 2 call from framework ..."
> 
> New output: "Dropping TEARDOWN call from framework ..."
> 
> 
> Diffs
> -
> 
>   src/master/master.cpp 98441a543611d4083b2495ee103f0ab5e2187e83 
> 
> Diff: https://reviews.apache.org/r/43075/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Review Request 43075: Fixed error message when dropping a scheduler::Call message.

2016-02-01 Thread Neil Conway

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

Review request for mesos and Vinod Kone.


Repository: mesos


Description
---

Old output: "Dropping 2 call from framework ..."

New output: "Dropping TEARDOWN call from framework ..."


Diffs
-

  src/master/master.cpp 98441a543611d4083b2495ee103f0ab5e2187e83 

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


Testing
---

make check


Thanks,

Neil Conway