cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aaron morton <>
Subject Re: SCF column comparator
Date Mon, 26 Sep 2011 21:03:21 GMT
it's the other way around…


When using Create Column Family in the CLI:

	key_validation_class applies to the row key
	comparator applies to the super column (when using a Super Column Family)
	subcomparator applied to the sub column (when using a Super Column Family)

In your current model consider:

- using an Integer or TimeUUID comparator
- setting the super column name to milliseconds / seconds past epoch or using a Time UUID.

I would suggest trying to model your data using a standard CF to start with, it will be easier
on your brain and there are some limitations to a super CF. 

Hope that helps. 

Aaron Morton
Freelance Cassandra Developer

On 27/09/2011, at 3:46 AM, Sam Hodgson wrote:

> Hi all,
> Im trying to create a Threads SCF that will store message thread id's in date order and
i want to store the threadID => subject as the supercolumns.  Please correct me if im incorrect
but my understanding of a super column family is as follows:
> Category: //row key
>    Timestamp: //Column
>       ThreadID => Thread Subject //Supercolumn
> My question is how do I ensure the timestamp column is ordered chronologically as the
documentation for the cassandra-cli specify's that the comparator type is applied to the supercolumns.
 Also im new to Cassandra so any advice on alternate schemas is welcome, not sure if this
would be better to split up into multiple CF's or somehow use an index.
> Thanks in advance
> Sam

View raw message