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

Review request for mesos, Ben Mahler, Du Li, Shingo Omura, Niklas Nielsen, and 
Vinod Kone.


Repository: mesos-git


Description
-------

The initial Python CLI 'mesos-ps' tool used curl in order to make
concurrent HTTP requests. This was a giant hack (one which even
required getting the maximum open file descriptor limit to not
fork/exec too many curl subprocesses). Instead of using curl we know
use futures and threads. The choice to use futures was (a) because it
naturally abstracts what we're trying to do and (b) it's "pro style"
for Python > 3.x. For now, we've implemented the futures interface
minimally to accomplish what we need (see
src/cli/python/mesos/futures.py). In addition, we updated the way
mesos-ps was implemented to leverage the futures API.
    
To enable sharing of CLI utilities written in Python we've also added
a mechanism for installing Python modules. This will likely change in
the future to use PIP but for now we manually update PYTHONPATH (see
bin/mesos.sh.in and src/cli/mesos.cpp).
    
Finally, all of the CLI specific Python code has been updated to use
the standard four space indent rather than two.


Diffs
-----

  bin/mesos.sh.in 3d03ee4a02d90865fbc6fcfec2d3e44071bdcc1f 
  src/Makefile.am 9780d07a23ca196c541a44a85499c2f44a574b9c 
  src/cli/mesos-ps b7dca14977fb6cd28ca5f8ef65f2714d342b5c8d 
  src/cli/mesos.cpp 17a9f0c1553a0e1db060b3e3dd5788ff5cc759fe 
  src/cli/python/mesos/cli.py PRE-CREATION 
  src/cli/python/mesos/futures.py PRE-CREATION 

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


Testing
-------

$ make check
$ ./bin/mesos.sh ps --master=...
$ make install
$ mesos ps --master=...


Thanks,

Benjamin Hindman

Reply via email to