You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Philippe <wa...@gmail.com> on 2010/04/13 08:57:39 UTC

RE : Re: Two dimensional matrices

Okay so if i switch columns and super columns in my model i get what i want
don't i?

Super column = x
Column = time frame
Now i can get 2d range extracts from the grid and every cell will contain
all time frame data. Is this correct ?
I suppose that if that becomes too much data to retrieve, i can put
different time frames in different keyspaces ?

Assuming this is all correct, what are the consequences of these design
decisions in terms of partition tolerance and how data is balanced across
nodes ?

Thanks
Philippe

Le 13 avr. 2010 03:26, "Eric Evans" <ee...@rackspace.com> a écrit :

On Tue, 2010-04-13 at 00:45 +0200, Philippe wrote:
> > However, you are also saying there is...
No, what I mean is that you can perform a slice that returns either
sub-columns, or super columns. In the former, the column names you are
slicing on are the sub-columns (X coords), in the latter it is super
columns (time). So:

On X coords, (same as my previous mail).


get_range_slice(
keyspaceName,
ColumnParent(CFname, timeFrame),
SlicePredicate(
...
The "columns" attribute of the KeySlice structs returned will contain
the sub-columns contained in timeFrame that match your predicate.

On time.

get_range_slice(
   keyspaceName,
   ColumnParent(CFname, null),
   SlicePredicate(
       slice_range=SliceRange(timeStart, timeEnd, false, colCount)
   ),
   ystart,
   yend,
   rowCount,
   consistencyLevel,
)

The "columns" attribute of the KeySlice structs returned will contain
the super columns that match the predicate. Each of these super columns
will contain *all* of the sub-columns.


-- 
Eric Evans
eevans@rackspace.com

Re: RE : Re: Two dimensional matrices

Posted by Eric Evans <ee...@rackspace.com>.
On Tue, 2010-04-13 at 08:57 +0200, Philippe wrote:
> Okay so if i switch columns and super columns in my model i get what i
> want
> don't i?
> 
> Super column = x
> Column = time frame
> Now i can get 2d range extracts from the grid and every cell will
> contain all time frame data. Is this correct ?
> I suppose that if that becomes too much data to retrieve, i can put
> different time frames in different keyspaces ?

Sure.

> Assuming this is all correct, what are the consequences of these
> design decisions in terms of partition tolerance and how data is
> balanced across nodes ?

Partition tolerance doesn't really come into play here, and as for how
the data is distributed, that depends on your dataset, and your choice
of partitioner.

-- 
Eric Evans
eevans@rackspace.com