You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Ben Mahler <be...@gmail.com> on 2012/09/18 01:30:41 UTC

Re: Review Request: Refactoring unnecessary 'Try' into 'Try'

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

(Updated Sept. 17, 2012, 11:30 p.m.)


Review request for mesos, Benjamin Hindman, Vinod Kone, and Jie Yu.


Changes
-------

merge against latest trunk incoming


Summary (updated)
-----------------

Refactoring unnecessary 'Try<bool>' into 'Try<Nothing>'


Description
-------

We unnecessarily have Try<bool>s all over the place, these are tri-state: {error, some:true, some:false}. It seems most cases, we never use {some:false} in the function or the caller.

So, this restores some sanity to use two-state Try<void>s: {error, some}


Diffs
-----

  src/linux/cgroups.hpp 1a3cdc2 
  src/linux/cgroups.cpp 53d611f 
  src/linux/fs.hpp 31a6100 
  src/linux/fs.cpp 744aea6 
  src/log/replica.cpp 2bba6fc 
  src/logging/logging.cpp d6d31ec 
  src/slave/cgroups_isolation_module.hpp 00255b5 
  src/slave/cgroups_isolation_module.cpp e0289b2 
  src/slave/gc.hpp 3760d09 
  src/slave/gc.cpp 5212a41 
  src/slave/process_based_isolation_module.cpp 2264b2f 
  src/slave/slave.cpp 4ea1db1 
  src/tests/cgroups_tests.cpp fbaa046 
  src/tests/configurator_tests.cpp 8baed76 
  src/tests/files_tests.cpp 15a378f 
  src/tests/stout_tests.cpp f690fac 
  src/tests/zookeeper_server.hpp 4f34910 
  src/webui/webui.cpp d4f2ab9 
  third_party/libprocess/include/stout/os.hpp d08b0cb 
  third_party/libprocess/include/stout/try.hpp ec0a7b6 
  third_party/libprocess/src/process.cpp d5bee23 

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


Testing
-------

osx 10.7 gcc 4.2.1
redhat Red Hat 4.1.2-48 gcc 4.1.2

make
make check

note that SampleFrameworks.PythonFramework is consistently failing on red hat, unrelated to this change


Thanks,

Ben Mahler


Re: Review Request: Refactoring unnecessary 'Try' into 'Try'

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7001/
-----------------------------------------------------------

(Updated Sept. 18, 2012, 12:07 a.m.)


Review request for mesos, Benjamin Hindman, Vinod Kone, and Jie Yu.


Changes
-------

merged with trunk, unfortunately trunk is broken :(


Description
-------

We unnecessarily have Try<bool>s all over the place, these are tri-state: {error, some:true, some:false}. It seems most cases, we never use {some:false} in the function or the caller.

So, this restores some sanity to use two-state Try<void>s: {error, some}


Diffs (updated)
-----

  src/linux/cgroups.hpp 1a3cdc2 
  src/linux/cgroups.cpp 53d611f 
  src/linux/fs.hpp 31a6100 
  src/linux/fs.cpp 744aea6 
  src/log/replica.cpp 2bba6fc 
  src/logging/logging.cpp d6d31ec 
  src/slave/cgroups_isolation_module.hpp 00255b5 
  src/slave/cgroups_isolation_module.cpp e0289b2 
  src/slave/gc.hpp 0f3dde6 
  src/slave/gc.cpp 882cf3c 
  src/slave/process_based_isolation_module.cpp 2264b2f 
  src/slave/slave.cpp b85f954 
  src/tests/cgroups_tests.cpp fbaa046 
  src/tests/configurator_tests.cpp 8baed76 
  src/tests/files_tests.cpp 15a378f 
  src/tests/stout_tests.cpp f690fac 
  src/tests/zookeeper_server.hpp 4f34910 
  src/webui/webui.cpp d4f2ab9 
  third_party/libprocess/include/stout/os.hpp 5b909b9 
  third_party/libprocess/include/stout/try.hpp ec0a7b6 
  third_party/libprocess/src/process.cpp d5bee23 

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


Testing
-------

osx 10.7 gcc 4.2.1
redhat Red Hat 4.1.2-48 gcc 4.1.2

make
make check

note that SampleFrameworks.PythonFramework is consistently failing on red hat, unrelated to this change


Thanks,

Ben Mahler


Re: Review Request: Refactoring unnecessary 'Try' into 'Try'

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7001/#review11637
-----------------------------------------------------------

Ship it!


Ship It!

- Vinod Kone


On Sept. 17, 2012, 11:30 p.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7001/
> -----------------------------------------------------------
> 
> (Updated Sept. 17, 2012, 11:30 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Vinod Kone, and Jie Yu.
> 
> 
> Description
> -------
> 
> We unnecessarily have Try<bool>s all over the place, these are tri-state: {error, some:true, some:false}. It seems most cases, we never use {some:false} in the function or the caller.
> 
> So, this restores some sanity to use two-state Try<void>s: {error, some}
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp 1a3cdc2 
>   src/linux/cgroups.cpp 53d611f 
>   src/linux/fs.hpp 31a6100 
>   src/linux/fs.cpp 744aea6 
>   src/log/replica.cpp 2bba6fc 
>   src/logging/logging.cpp d6d31ec 
>   src/slave/cgroups_isolation_module.hpp 00255b5 
>   src/slave/cgroups_isolation_module.cpp e0289b2 
>   src/slave/gc.hpp 3760d09 
>   src/slave/gc.cpp 5212a41 
>   src/slave/process_based_isolation_module.cpp 2264b2f 
>   src/slave/slave.cpp 4ea1db1 
>   src/tests/cgroups_tests.cpp fbaa046 
>   src/tests/configurator_tests.cpp 8baed76 
>   src/tests/files_tests.cpp 15a378f 
>   src/tests/stout_tests.cpp f690fac 
>   src/tests/zookeeper_server.hpp 4f34910 
>   src/webui/webui.cpp d4f2ab9 
>   third_party/libprocess/include/stout/os.hpp d08b0cb 
>   third_party/libprocess/include/stout/try.hpp ec0a7b6 
>   third_party/libprocess/src/process.cpp d5bee23 
> 
> Diff: https://reviews.apache.org/r/7001/diff/
> 
> 
> Testing
> -------
> 
> osx 10.7 gcc 4.2.1
> redhat Red Hat 4.1.2-48 gcc 4.1.2
> 
> make
> make check
> 
> note that SampleFrameworks.PythonFramework is consistently failing on red hat, unrelated to this change
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>