cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dir dir <sikerasa...@gmail.com>
Subject Re: how to store file in the cassandra?
Date Mon, 26 Apr 2010 09:44:45 GMT
Hi Jonathan,

Cassandra seems has not a Blob data type. To handle binary large object
data,
we have to use array of byte. I have a question to you. Suppose I have a
MPEG
video files 15 MB. To save this video file into Cassandra database I will
store
this file into array of byte. One day, I feel this video is not necessary
again,
therefore I delete it from the database. My question is, after I delete this
video from Cassandra database, should I perform defragmentation operation
into Cassandra's file database??

Thank you.


On Mon, Apr 26, 2010 at 8:28 AM, Jonathan Ellis <jbellis@gmail.com> wrote:

> Cassandra stores byte arrays.  You can certainly store file data in
> it, although if it is larger than a few MB you should chunk it into
> multiple columns.
>
> On Sun, Apr 25, 2010 at 8:21 PM, Shuge Lee <shuge.lee@gmail.com> wrote:
> > Yes.
> >
> > Cassandra does save raw string data only, not a file, and shouldn't save
> a
> > file.
> >
> > 2010/4/26 刘兵兵 <rucbing@gmail.com>
> >>
> >> sorry i'm not very familiar with python, are you meaning that the files
> >> are stored in the file system of the os?
> >>
> >> then , the cassandra just stores the path to access the files?
> >>
> >>
> >> On Mon, Apr 26, 2010 at 8:57 AM, Shuge Lee <shuge.lee@gmail.com> wrote:
> >>>
> >>> In Python:
> >>>
> >>> keyspace.columnfamily[key][column] = value
> >>>
> >>> files.video[uuid.uuid4()]['name'] = 'foo.flv'
> >>> files.video[uuid.uuid4()]['path'] = '/var/files/foo.flv'
> >>>
> >>> create a mapping
> >>> files.video =  {
> >>>     uuid.uuid4() : {
> >>>         'name' : 'foo.flv',
> >>>         'path' : '/var/files/foo.flv',
> >>>     }
> >>> }
> >>>
> >>> if most of sizes >= 0.5MB, use sys-fs/reiser4progs, else use ext4.
> >>>
> >>>
> >>> 2010/4/26 Bingbing Liu <rucbing@gmail.com>
> >>>>
> >>>> any suggestion?
> >>>>
> >>>> 2010-04-26
> >>>> ________________________________
> >>>> Bingbing Liu
> >>>
> >>>
> >>> --
> >>> Shuge Lee | Lee Li | 李蠡
> >>
> >>
> >>
> >> --
> >> Bingbing Liu
> >>
> >> Web and Mobile Data Management lab
> >>
> >> Renmin University  of  China
> >
> >
> >
> > --
> > Shuge Lee | Lee Li | 李蠡
> >
>

Mime
View raw message