You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Vinod Kone <vi...@gmail.com> on 2015/12/03 23:34:57 UTC

Re: Review Request 40559: Added a wait() function to Subprocess.

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

Ship it!


Ship It!

- Vinod Kone


On Nov. 20, 2015, 9:06 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40559/
> -----------------------------------------------------------
> 
> (Updated Nov. 20, 2015, 9:06 p.m.)
> 
> 
> Review request for mesos, Ben Mahler and Vinod Kone.
> 
> 
> Bugs: MESOS-3035
>     https://issues.apache.org/jira/browse/MESOS-3035
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a wait() function to Subprocess. This is similar to `Popen.communicate(None)` in python. See the example code below:
> 
> ```
> Try<Subprocess> s = subprocess(...);
> if (s.isError()) {
>   ...
> }
> 
> return s.get().wait()
>   .then([](const Subprocess::Result& result) {
>     if (result.status.isNone()) { ... }
>     if (result.status.get() != 0) { ... }
>     
>     handle(result.out.get());
>     handle(result.err.get());
>   });
> ```
> 
> Relevant review: https://reviews.apache.org/r/37336/
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/subprocess.hpp f17816e813d5efce1d3bb1ff1e1111850eeda3ba 
>   3rdparty/libprocess/src/subprocess.cpp e51f024e89594d84f1dfb7ee6f2e1d8fb33b4a08 
>   3rdparty/libprocess/src/tests/subprocess_tests.cpp ac600a551fb1a7782ff33cce204b7819497ef54a 
> 
> Diff: https://reviews.apache.org/r/40559/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 40559: Added a wait() function to Subprocess.

Posted by Jie Yu <yu...@gmail.com>.

> On Dec. 3, 2015, 10:34 p.m., Vinod Kone wrote:
> > Ship It!

There's some controversy regarding this patch. I'll move this logic to hdfs.cpp as a helper. Discard this patch for now. Will send a new one shortly.


- Jie


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


On Nov. 20, 2015, 9:06 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40559/
> -----------------------------------------------------------
> 
> (Updated Nov. 20, 2015, 9:06 p.m.)
> 
> 
> Review request for mesos, Ben Mahler and Vinod Kone.
> 
> 
> Bugs: MESOS-3035
>     https://issues.apache.org/jira/browse/MESOS-3035
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a wait() function to Subprocess. This is similar to `Popen.communicate(None)` in python. See the example code below:
> 
> ```
> Try<Subprocess> s = subprocess(...);
> if (s.isError()) {
>   ...
> }
> 
> return s.get().wait()
>   .then([](const Subprocess::Result& result) {
>     if (result.status.isNone()) { ... }
>     if (result.status.get() != 0) { ... }
>     
>     handle(result.out.get());
>     handle(result.err.get());
>   });
> ```
> 
> Relevant review: https://reviews.apache.org/r/37336/
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/subprocess.hpp f17816e813d5efce1d3bb1ff1e1111850eeda3ba 
>   3rdparty/libprocess/src/subprocess.cpp e51f024e89594d84f1dfb7ee6f2e1d8fb33b4a08 
>   3rdparty/libprocess/src/tests/subprocess_tests.cpp ac600a551fb1a7782ff33cce204b7819497ef54a 
> 
> Diff: https://reviews.apache.org/r/40559/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>