mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jie Yu <yujie....@gmail.com>
Subject Re: Review Request 51272: Refactored the agent 'launcher' flag to always have a value.
Date Tue, 23 Aug 2016 20:53:58 GMT


> On Aug. 22, 2016, 7 p.m., Jie Yu wrote:
> > src/local/local.cpp, lines 343-350
> > <https://reviews.apache.org/r/51272/diff/1/?file=1480481#file1480481line343>
> >
> >     I'd suggest we move this logic down below. more readable to me (current logic
is broken into two pieces).
> >     ```
> >     // ...
> >     if (flags.num_slaves > 1) {
> >       LOG(WARNING) << ...;
> >       
> >       flags.launcher = "posix";
> >     }
> >     ```
> 
> Benjamin Hindman wrote:
>     Agreed I'd rather have the logic in one place, however: (1) then we'd be printing
out a lot of log messages (one for each agent) and (2) we'd still have logic in two places
because we'll need to pull out a 'num_slaves' variable (or 'launcher' variable, as I did here)
above the loop because 'flags' gets overriden within the loop and I didn't want to make a
bigger change by renaming 'flags'. So, either we leave it, rename the inner 'flags', or do
you have another suggestion?

Yeah, i'd prefer rename the inner flag to `slaveFlags`. It's confusing to me that we have
two set of flags using the same name.


- Jie


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


On Aug. 22, 2016, 4:53 a.m., Benjamin Hindman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51272/
> -----------------------------------------------------------
> 
> (Updated Aug. 22, 2016, 4:53 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Kevin Klues.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Refactored the agent 'launcher' flag to always have a value.
> 
> 
> Diffs
> -----
> 
>   src/local/local.cpp 1e1d246790a0d44d1baf802b903dc4f2bde1ac63 
>   src/slave/containerizer/mesos/containerizer.cpp 77a502f853e3e04ea8e274419544601778be9421

>   src/slave/flags.hpp 1a006663e7cc58ee548b3dda686cfbac0c240baa 
>   src/slave/flags.cpp 0f2be1700f41b74da4ea1ce699a81ec33cf92a9a 
> 
> Diff: https://reviews.apache.org/r/51272/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Benjamin Hindman
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message