using the FilePaths plugin
Justin Huff
jjhuff at mspin.net
Mon Mar 19 21:23:29 UTC 2007
Matt,
10 days ago I posted a plugin (FIDQuery) that might be useful It allows
you to query for the domain/key of a given FID. Handy for debugging.
FilePaths looks to be more about mapping a file hierarchy onto mogile keys.
If you're just wanting to get paths that actually contain the key in the
URL, you're probably out of luck.
--Justin
Matt Kent wrote:
> Hi all, I'm a new user of MogileFS. I'm using it for a senior project at
> my university. Anyway, for my situation it would be helpful to get back
> the original file names of the files instead of 001.fid and the like.
> After some investigation, I found the FilePaths plugin in the MogileFS
> source which seems to do just that. However, I can't figure out how to
> use it. Furthermore, I can't find any documented record of anyone else
> actually using it.
>
> So my question is this: has anyone ever used the FilePaths plugin, and
> if so, what does it do and how do you use it? Here's what I tried:
>
> (using a ruby client from a rails app...)
>
> My test code looks like this:
>
> mg = MogileFS::MogileFS.new(:domain => 'mydomain' :hosts =>
> ["x.x.x.x:6001"],
> :root => '/var/mogdata')
> mg.store_file 'mykey', 'myclass', afile
> assert mg.get_paths('mykey').size > 0
>
> Pretty simple, just store the file and assert that it got stored
> somewhere. I got MogileFS set up so that works fine. Then I tried to add
> this line to /etc/mogilefs/mogilefsd.conf:
>
> plugins FilePaths
>
> And then the client blows up, the list of paths it receives is nil and
> the test fails. What else do I have to do to get the plugin working? Thanks.
>
> Matt
>
>
More information about the mogilefs
mailing list