3

I'm trying to define a schema in Cassandra 0.7 and would appreciate help resolving an issue I ran into. I set up a Super Column Family in cassandra-cli:

create column family SimulationSummary with column_type='Super' and comparator='LexicalUUIDType'and subcomparator='TimeUUIDType';

This completes successfully. However, when I attempt to update the column family with metadata:

update column family SimulationSummary with column_metadata=
...   [{column_name: underlying, validation_class:BytesType}];

I get the error message:

Invalid UUID String: underlying

This is a representative problem of several other column families (some not super column families).

I have a couple of column family metadata updates that work fine, but I haven't been able to determine why some entries work okay while other do not. For example the following is successful:

create column family User
  with comparator='UTF8Type';
update column family User with column_metadata=
[
  {column_name: email, validation_class:UTF8Type},
  {column_name: given_name, validation_class:UTF8Type},
  {column_name: surname, validation_class:UTF8Type}
];
dr.
  • 247
  • 1
  • 5
  • 13

1 Answers1

4

you said comparator='LexicalUUIDType'. That means column names must be UUIDs. 'underlying' is not a UUID so it is not a valid column name.

in the working example, comparator is UTF8 and all the column names you use are indeed UTF8 strings.

jbellis
  • 19,347
  • 2
  • 38
  • 47
  • Thanks. I was thinking the comparator applied to the rowkey rather than the column_name. How can I apply meta-data to my columns while supporting uuid super column names & rowkeys? For example, say the super column name for the SimulationSummary was a Project column family rowkey of type lex-uuid and a rowkey of a time-uuid for the simulation run? As shown above the super column will have an underlying column which will contain a byte array. Thanks! I know I can not include the metadata and be okay, but I'd like to have the conversion when I ad-hoc browse keystore. – dr. Mar 09 '11 at 18:42