Methods to return metadata given a MogileFS key?

Arthur Bebak abebak at
Tue Oct 10 23:25:06 UTC 2006

I'm looking around in the source code and unless I'm missing something blindingly obvious
it does not look like the MogileFS::Client has any methods to return info about the file
which corresponds to some key.

Here's what I think would be useful:

# Create a MogileFS object and store some file in the system
my $mogfs = MogileFS->new(domain => 'testdomain',
                           hosts  => [ '' ],
my $key = "some_key";
my $class = "some_class";
my $fname = "/path/to/file";
$mogfs->store_file($key, $class, $fname);

# ... time passes ...

# Grab the metadata
my ($domain, $class, $size, $fid, $devcount) = $mogfs->get_metadata($key);

I noticed that there is a "list_fids" in, but that does not quite
do what is needed.

This information would be useful if you have two independent processes
which only share the knowledge of the key space storing and reading files.


Arthur Bebak
abebak at

More information about the mogilefs mailing list