using the FilePaths plugin

Matt Kent matthew.e.kent at gmail.com
Mon Mar 19 21:31:12 UTC 2007


Justin,

Thanks for the reply, I'll take a look at FIDQuery.

Unfortunately, that's basically what I'm trying to do, is get paths that
contain the key in the URL. I was hoping to use MogileFS as sort of a
two-in-one distributed file system and mirror system, where you could
download the file directly from the storage node. It seems that isn't how
MogileFS was intended to be used, it only serves as an application-level
utility. Am I correct?

Matt

On 3/19/07, Justin Huff <jjhuff at mspin.net> wrote:
>
> 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
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/mogilefs/attachments/20070319/ce86db61/attachment.html


More information about the mogilefs mailing list