ANN: python client

Justin Azoff JAzoff at uamail.albany.edu
Fri May 6 08:12:25 PDT 2005


I'm mostly finished porting the perl client to python.  I started with a
pretty literal translation and then redid how some things worked, like
exceptions and default arguments.

It is almost identical to the perl api, I think the only real change I
did was add a file argument to get_file_data so you can do

tmpfp=open("/tmp/file", 'w')
c.get_file_data('file', fp=tmpfp)
tmpfp.close()

or 
c.get_file_data('file', sys.stdout)

that was easy to do since I used pycurl.

All that is left I think is to implement MogileFS::Admin(and lots of
unit tests...), but that looks easy enough.  I also want to port
mogtool.. I am not sure if I should put the big file chunk handling in
mogilefs.py itself, or leave it as separate code.

I've stashed it at
http://www.albany.edu/~ja6447/mogilefs.py
for the time being.

Some things might not work right, testing the failure handling will be
tricky.. I need to get more nodes running where I can easily turn off
ports or killall mogstored and see what happens.

-- 
-- Justin Azoff
-- Network Performance Analyst



More information about the mogilefs mailing list