Search code examples
schemacassandracommand-line-interfacecassandra-0.7

Why am I getting an Invalid UUID String when I update Cassandra column metadata?


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}
];

Solution

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