> On Nov. 21, 2012, 7:42 p.m., Ben Mahler wrote:
> > src/slave/slave.cpp, line 100
> > <https://reviews.apache.org/r/8171/diff/1/?file=222607#file222607line100>
> >
> >     Seems cleaner to not store the option:
> >     
> >     double cpus;
> >     if (resources.cpus().isSome()) {
> >       cpus = resources.cpus().get();
> >     } else {
> >       ...
> >     }
> >     
> >

That would mean re-computing resource.cpus() twice! I wanted to avoid that.


> On Nov. 21, 2012, 7:42 p.m., Ben Mahler wrote:
> > src/slave/slave.cpp, line 164
> > <https://reviews.apache.org/r/8171/diff/1/?file=222607#file222607line164>
> >
> >     stringify can do this work for you:
> >     
> >     ports = stringify(resources.ports().get())

good to know


> On Nov. 21, 2012, 7:42 p.m., Ben Mahler wrote:
> > src/slave/slave.cpp, line 169
> > <https://reviews.apache.org/r/8171/diff/1/?file=222607#file222607line169>
> >
> >     I preferred the old format FWIW, looks like this new one conforms less 
> > to the formatting style we discussed?

it actually  fits one line


> On Nov. 21, 2012, 7:42 p.m., Ben Mahler wrote:
> > src/slave/slave.cpp, line 170
> > <https://reviews.apache.org/r/8171/diff/1/?file=222607#file222607line170>
> >
> >     Can we keep mem and disk as %d? What does a fractional byte mean?
> >     
> >     I guess we should have had an Integer type Scalar, for things like this.

those are in MB so fractionals are expected and allowed.


- Vinod


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


On Nov. 21, 2012, 6:47 p.m., Vinod Kone wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8171/
> -----------------------------------------------------------
> 
> (Updated Nov. 21, 2012, 6:47 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Description
> -------
> 
> Now we properly set cpu/mem/disk/ports based on what's missing in slave flags.
> 
> Also moved usage from os to fs.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp 7deb4574943aae4cfc5da5d6b3f600042686975f 
>   src/tests/exception_tests.cpp 13355d08788432ed07679daf24c2d74cc12a7f11 
>   third_party/libprocess/include/stout/fs.hpp 
> 9e62a1b91bc9fac092818ffb3c8bcec46b0bd26d 
>   third_party/libprocess/include/stout/os.hpp 
> 76e5e0624af36a0021755fb4acf7f76bfb81a823 
> 
> Diff: https://reviews.apache.org/r/8171/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Vinod Kone
> 
>

Reply via email to