0

I'm trying to leverage a specific feature of Apache Cassandra CQL3, which is partition and clustering keys for tables which are created with compact storage option.

For Eg.

CREATE TABLE EMPLOYEE(id uuid, name text, field text, value text, primary key(id, name , field )) with compact storage;

I've created the table via CQL3 and i;m able to insert rows successfully using the Hector API.

But I couldn't find right set of options in the hector api to create the table itself as i require.

To elaborate a little bit more: In ColumnFamilyDefinition.java i couldnt see an option for setting storage option (as compact storage) and In ColumnDefinition.java, i couldnt find the option to say that this column is part of the Partition and Clustering Keys

Could you please give me an idea of whether i can use Hector for this (i.e. Creating table) or not and if i can do that, what are the options that i need to provide?

Charles
  • 50,943
  • 13
  • 104
  • 142
Kathir
  • 27
  • 7

1 Answers1

1

If you are not tied to Hector, you could look into the DataStax Java Driver which was created to use CQL3 and Cassandra's binary protocol.

Alex Popescu
  • 3,982
  • 18
  • 20
  • Thanks Alex. I've tried that with the DataStax driver, its working. We'r kind of tied to Hector in a way i have all our DB access written using that API. Probably, might have to switch to DataStax driver. Also posted this question in Hector groups and waiting for them to respond to know whether this is available or ll be added in Hector or not. – Kathir Aug 05 '13 at 15:46