[chord] how to store/fetch a string defined by user?

Emil Sit sit at MIT.EDU
Mon May 5 13:00:55 EDT 2008


On Fri, 25 April 2008 at 09:56 (+0800), 林珈 wrote:
> (1) tools/filestore /tmp/chord-sock -s a.txt 1
> 
>  len 11 inflight 0
>  len 20
>  p
>  len 280
>  55500ec09625b0a1749e75c4904c86c61b6890d1
>  what's meaning of the orange lines?

These are basically diagnostic lines that indicate the progress
of filestore: what kinds of objects are being stored and their sizes.

> (2) tools/filestore /tmp/chord-sock -l  hash 1
> 
> a.txt: 11 bytes
> Can more infomations of the file be ouputted? Must we write the hash number
> of the txt to fetch it?

At this time, this is the only information that is stored as
part of filestore.  In theory, additional information that appears
in a Unix FFS-style inode could also be stored.
> 
> (3)tools/filestore /tmp/chord-sock -f  1
> 
> retrieve 55500ec09625b0a1749e75c4904c86c61b6890d1
> retrieve 9819e0555bb48476b2daf9f40d465bb521f5c2d9
> retrieve 94d6bfdf53a0fd332fc2771d0f2e6ba5126f296
> 
> What's meaning of the three hash numbers?

Filestore uses a hash-tree inspired by SFSRO to store files.  That
means each file is broken into several pieces---these represent the
chordID of those pieces.

http://portal.acm.org/citation.cfm?doid=505452.505453

> 
> (4)The dbm command :
> tooles/dbm /dhash-1/dhash-sock store chash 2 8
> 
> I think the dbm created 2 keys ,and then stored them in chord. How to store
> some datas defined by user with dbm?

You'll have to customize the dbm source; there's (surprisingly?) no
tool right now to directly store a piece of data into the system and
then retrieve it.

-- 
Emil Sit / MIT CSAIL PDOS / http://pdos.csail.mit.edu/chord/  



More information about the chord mailing list