in my example I'd like to store files in two column families: files_meta and files_data
files_meta contains attributes like name, size etc
files_data contains the actual raw data splitted into chunks
I'd like to use UUIDs as ByteType keys but at the same time the column names in files_meta should be in UTF8Type
update column family files_data
with comparator = 'BytesType'
and key_validation_class = 'BytesType'
and column_metadata =
[
];
update column family files_meta
with comparator = 'BytesType'
and key_validation_class = 'BytesType'
and default_validation_class = 'UTF8Type'
and column_metadata =
[
{column_name: name, validation_class: UTF8Type},
{column_name: size, validation_class: LongType},
];
unfortunately cassandra (1.0.6) does not allow to have different key- and column_name-types? at least CLI does not like this column family definition
I'm not sure yet if I really need that as I'm just getting started with Cassandra but it looks strange to me that the key_validation_class also accounts for the column names
