cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Hodgson <>
Subject RE: SCF column comparator
Date Tue, 27 Sep 2011 18:26:32 GMT

Helps a lot Arron thanks for your time :)


Subject: Re: SCF column comparator
Date: Tue, 27 Sep 2011 10:03:21 +1300

it's the other way around…
row-key:	super-column:		(sub)column:
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
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 MortonFreelance Cassandra Developer@aaronmorton

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


View raw message