You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by zevon <sa...@expedia.com> on 2008/01/29 20:23:36 UTC

Stores files on disk and metadata in db

Is this feasible? 

Thanks,
Sateesh.
-- 
View this message in context: http://www.nabble.com/Stores-files-on-disk-and-metadata-in-db-tp15167240p15167240.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Stores files on disk and metadata in db

Posted by Thomas Mueller <th...@gmail.com>.
Hi,

> The DataStore maintains only one copy of each file.

Exactly - this saves a lot of space.

> file naming is based on the SHA-1 digest of the file contents

Yes. In theory, you could write a persistence manager wrapper (a
PersistenceManager that calls another PersistenceManager and does some
other stuff), that maintains directories and soft links to the right
file. This is just an idea. I'm not sure how you would do that in
Windows (create a 'shortcut'?).

Regards,
Thomas

Re: Stores files on disk and metadata in db

Posted by Esteban Franqueiro <es...@bea.com>.
> 1) If the same file is being uploaded under different directory structures,
> I see only one file on disk. Which seems to be by design as per my
> understanding of the doc

It is. The DataStore maintains only one copy of each file.

> 2) How is the directory structure determined when written to disk?. One
> reason I wanted to store files on disk, is to browse for it given I know dir
> structure and fileName. But, I can't see to be able to do this. Is there a
> way around this?

The directory structure and file naming is based on the SHA-1 digest of the file contents (hence the 
fact that only one copy is kept on disk). If I rememer correctly, the first two chars are used for 
the first level directory, the next two for the second level, and the next two for the third level, 
and finally the file is moved in there.
I hope I got it right, and that it helps you.
Regards,

Esteban Franqueiro
esteban.franqueiro@bea.com 


Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.

Re: Stores files on disk and metadata in db

Posted by zevon <sa...@expedia.com>.
Thanks Thomas.

I tried that and I see that files are getting stored on the disk. But two
things I noticed:
1) If the same file is being uploaded under different directory structures,
I see only one file on disk. Which seems to be by design as per my
understanding of the doc
2) How is the directory structure determined when written to disk?. One
reason I wanted to store files on disk, is to browse for it given I know dir
structure and fileName. But, I can't see to be able to do this. Is there a
way around this?

Thanks.


Thomas Mueller-6 wrote:
> 
> Hi,
> 
> What about using the (default) bundle database persistence manager
> http://wiki.apache.org/jackrabbit/PersistenceManagerFAQ
> together with FileDataStore: http://wiki.apache.org/jackrabbit/DataStore
> 
> Regards,
> Thomas
> 
> 
> 
> On Jan 29, 2008 8:23 PM, zevon <sa...@expedia.com> wrote:
>>
>> Is this feasible?
>>
>> Thanks,
>> Sateesh.
>> --
>> View this message in context:
>> http://www.nabble.com/Stores-files-on-disk-and-metadata-in-db-tp15167240p15167240.html
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Stores-files-on-disk-and-metadata-in-db-tp15167240p15172744.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Stores files on disk and metadata in db

Posted by Esteban Franqueiro <es...@bea.com>.
Hi Jim.

> Will this really put all "files" on disk, even if they are smaller than 
> the minRecordLength parameter to the FileDataStore?

To store every "file" in the file data store use minRecordLength = 0.

> What about metadata 
> that is larger than minRecordLength?

Save from an id, file size and last modified time, no metadata is stored in the data store.
Regards,

Esteban Franqueiro
esteban.franqueiro@bea.com

Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.

Re: Stores files on disk and metadata in db

Posted by Jim Gellman <jg...@systemsbiology.org>.
Will this really put all "files" on disk, even if they are smaller than 
the minRecordLength parameter to the FileDataStore?  What about metadata 
that is larger than minRecordLength?

jim

Thomas Mueller wrote:
> Hi,
>
> What about using the (default) bundle database persistence manager
> http://wiki.apache.org/jackrabbit/PersistenceManagerFAQ
> together with FileDataStore: http://wiki.apache.org/jackrabbit/DataStore
>
> Regards,
> Thomas
>
>
>
> On Jan 29, 2008 8:23 PM, zevon <sa...@expedia.com> wrote:
>   
>> Is this feasible?
>>
>> Thanks,
>> Sateesh.
>> --
>> View this message in context: http://www.nabble.com/Stores-files-on-disk-and-metadata-in-db-tp15167240p15167240.html
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
>>
>>     


Re: Stores files on disk and metadata in db

Posted by Thomas Mueller <th...@gmail.com>.
Hi,

What about using the (default) bundle database persistence manager
http://wiki.apache.org/jackrabbit/PersistenceManagerFAQ
together with FileDataStore: http://wiki.apache.org/jackrabbit/DataStore

Regards,
Thomas



On Jan 29, 2008 8:23 PM, zevon <sa...@expedia.com> wrote:
>
> Is this feasible?
>
> Thanks,
> Sateesh.
> --
> View this message in context: http://www.nabble.com/Stores-files-on-disk-and-metadata-in-db-tp15167240p15167240.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>