[Yanel-dev] yarep patch to support splitting of paths

Michael Wechner michael.wechner at wyona.com
Sun Aug 15 11:44:00 CEST 2010


Claudio Corrodi wrote:
> I added the feature that when trying to read a file that doesn't exist 
> at the splitted destination but if it exists at the "original" 
> destination, then the file is copied to the splitted path. Let me make 
> an example:
>
> In the filesystem, there is a file /data/foobar.txt and /data/ is the
> repository root. Let's also assume that the repository is configured 
> such that /foobar.txt results in reading/writing the file 
> /data/foo/bar.txt. If /data/foo/bar.txt doesn't exist, but 
> /data/foobar.txt does, then this update falls back to /data/foobar.txt 
> after failing to get a stream for /data/foo/bar.txt. It then copies 
> /data/foobar.txt to /data/foo/bar.txt and continues using the new 
> (splitted) path.

thanks very much for this. I will try to review it during next week.

(btw, I assume that this patch replaces the one of your previous email 
and is not meant as additional patch, right?)

Cheers

Michael
>
> Note that the old file isn't removed after copying, maybe we want to add
> this functionality later.
>
> Regards,
> Claudio
>
> On 07/16/2010 10:58 AM, Claudio Corrodi wrote:
>> Hi
>>
>> Attached is a patch which allows to configure a
>> VirtualFileSystemRepository to split paths automatically according to
>> various parameters. A use case would be for example if you need to store
>> a lot of files under a certain path, e.g. /data/ and want them in
>> multiple subdirectories. Then this patch allows you to define rules such
>> that paths like /data/76f76641-c80d-4cd7-9470-c47eeae48bbc are actually
>> stored at /data/76f7/7664/-c80d-4cd7-9470-c47eeae48bbc.
>>
>> Please take a look at src/test/repository/new-vfs-example/repository.xml
>> for a description and example configuration. I also updated the
>> VirtualFilesystemRevisionTest which can be run using "./build.sh test
>> -Dtest.class.name=org.wyona.yarep.tests.VirtualFilesystemRevisionsTest".
>>
>> Regards,
>> Claudio
>>
>



More information about the Yanel-development mailing list