cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Schmidt <>
Subject Composite row keys with SSTableSimpleUnsortedWriter for Cassandra 1.0?
Date Fri, 31 Aug 2012 18:44:24 GMT

I'm using DataStax Enterprise 2.1, which is based on Cassandra 1.0.10 from what I can tell.
 For my project, I perform a content build that generates a number of SSTables using SSTableSimpleUnsortedWriter.
These are loaded using either JMX or sstableloader depending on the environment.

I want to introduce a composite row key into some of the generated SSTables.  Also, I will
be referring to these keys by using composite column names.

I can define the desired composite time and provide it to the SSTableSimpleUnsortedWriter

		List<AbstractType<?>> compositeList = new ArrayList<AbstractType<?>>();
		compositeUtf8Utf8Type = CompositeType.getInstance(compositeList)
		articleWriter = new SSTableSimpleUnsortedWriter(

I then figured I could use compositeUtf8Utf8Type when creating composite row keys and column
names of the kind I require.  Cassandra 1.1.x introduces the CompositeType.Builder class for
creating actual composite values, but that's not available to me.  I've also  seen examples
of using Hector's Composite to create composite values.

But, I need to create these values using the various classes within Cassandra 1.0 itself to
work with SSTableSimpleUnsortedWriter. For that, I'm not finding any examples on how one does

As far as I can tell, composite columns at least have been around since Cassandra 0.8.x? 
Is there the support I need in Cassandra 1.0.x?

Many thanks!

Jeff Schmidt
535 Consulting
(650) 423-1068

View raw message