I think you want the o.a.c.db.marshal.TypeParser. 

You can pass a CLI format composite type to the parse() func. 

It's in 1.0X


Aaron Morton
Freelance Developer

On 1/09/2012, at 6:44 AM, Jeff Schmidt <jas@535consulting.com> wrote:


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 constructor:

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 that.

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