Initial checkin of MogileFS Perl API, still lots of work to do.


git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@2 f67b2e87-0811-0410-a7e0-dd94e48410d6
-- fix some bugs

-- debugging

-- make _get_attrs function to get at hash attributes of a given object


git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@5 f67b2e87-0811-0410-a7e0-dd94e48410d6
hi i'm a hockey player but i'm playing golf day

-- brad committing as whitaker

Fixin':

get_paths to the top-layer, not a method on a new file

open files for +>  (clobber write, but readable) for Image::Size


git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@7 f67b2e87-0811-0410-a7e0-dd94e48410d6
-- delete is a method on MogileFS, not MogileFS::NewFile


git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@10 f67b2e87-0811-0410-a7e0-dd94e48410d6
-- make connection attempts timeout after 1 second

-- support for multiple hosts

-- cache dead hosts for 30 seconds


git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@11 f67b2e87-0811-0410-a7e0-dd94e48410d6
-- make debugging optional


git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@15 f67b2e87-0811-0410-a7e0-dd94e48410d6
-- new 'path' method on MogileFS::NewFile, which is just an accessor for
   the already existing 'mogilefs_newfile_path' attribute.


git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@18 f67b2e87-0811-0410-a7e0-dd94e48410d6
-- $self isn't a hashref in MogileFS::NewFile::path, need to call
   _get_attrs to get at the hashref part of the typeglob so we can
   return the path attribute.


git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@19 f67b2e87-0811-0410-a7e0-dd94e48410d6
Few changes to support server's new anonymous spool/temp file
functionality:

-- new_file method no longer requires key

-- close method on MogileFS::NewFile object accepts an optional key

-- new key getter/setter method on MogileFS::NewFile object


git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@25 f67b2e87-0811-0410-a7e0-dd94e48410d6
-- make NewFile getter/setter functions just wrappers around _getset

-- new getter/setters: class, key so they can be modified after a spool
   files is created and close will still be called properly


git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@26 f67b2e87-0811-0410-a7e0-dd94e48410d6
Add support for 2 new server modes: get_hosts and get_devices.  In doing
so, restructure classes to create MogileFS::Admin objects with a more
lenient set of constructor arguments than the regular MogileFS.

Summary of current classes and their roles:

   MogileFS - standard application interface

   MogileFS::Admin - interface for administration applications that won't
       work with files directly, but instead work at the server config
       level.  EG. hosts, devices, stats, etc.

   MogileFS::Backend - MogileFS and MogileFS::Admin classes use this for
       socket communications with the mogilefsd server.

   MogileFS::NewFile - subclass of IO::File, used for creation of new files
       on MogileFS, etc.

There are currently no external class methods, but internal class methods
now start with _.  Also for convenience, each package has an _fail function
which croaks, prefixing the errstr with the current class name.


git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@28 f67b2e87-0811-0410-a7e0-dd94e48410d6
Add reload methods to MogileFS and MogileFS::Backend

-- move guts of constructors into _init methods on MogileFS and
   MogileFS::Backend classes.

-- make new and reload methods wrappers around _init

-- more detailed error reporting on file opens


git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@42 f67b2e87-0811-0410-a7e0-dd94e48410d6
Implement MogileFS::errstr as a wrapper around MogileFS::Backend::errstr


git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@45 f67b2e87-0811-0410-a7e0-dd94e48410d6
Update MogileFS to support HTTP for all operations -- get, put, copy, and
delete.  This is made to interact with a Perlbal setup using mogstored as
the frontend.

People wishing to use the old style MogileFS on a local filesystem or NFS
should turn USE_HTTP to 0 at the top of mogilefsd.


git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@48 f67b2e87-0811-0410-a7e0-dd94e48410d6
We have already implemented the functions we need, so we don't need this
here anymore to tell of unimplemented functions.


git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@49 f67b2e87-0811-0410-a7e0-dd94e48410d6
fix root problem


git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@50 f67b2e87-0811-0410-a7e0-dd94e48410d6
Slight change to MogileFSd + the client library: if you call get_paths and
specify that noverify is a true value, that will instruct mogilefsd NOT to
verify the size of the file before returning the paths to you.

Net result: much faster if you already know how big the file you're getting is.


git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@51 f67b2e87-0811-0410-a7e0-dd94e48410d6
-- use strict in MogileFS::NewFile

-- use strict and Carp/Carp::croak (via _fail class method) in
   MogileFS::NewHTTPFile

-- Make formatting more consistent with rest of module


git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@53 f67b2e87-0811-0410-a7e0-dd94e48410d6
Add the get_file_data function call to the MogileFS API.  Now you can call
get_file_data and give it the key and it will figure out the paths to the
file and then get the contents of the file.


git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@56 f67b2e87-0811-0410-a7e0-dd94e48410d6
Add new method to the MogileFS objects that enable you to call get_domains
on them.  You will then get back a hashref containing all of the defined
domains, their classes, and the minimum replica count for each of them.

This is just the first part in a management interface that will enable us
to update the MogileFS database without having to craft queries manually.


git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@57 f67b2e87-0811-0410-a7e0-dd94e48410d6