Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cassandra/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Exception cassandra cli:无法强制';allias';到版本1 UUID_Exception_Cassandra_Uuid_Coerce - Fatal编程技术网

Exception cassandra cli:无法强制';allias';到版本1 UUID

Exception cassandra cli:无法强制';allias';到版本1 UUID,exception,cassandra,uuid,coerce,Exception,Cassandra,Uuid,Coerce,我正在创建一个列族,其中TimeUUIDType作为行名: create column family users with column_type = 'Standard' and comparator = 'TimeUUIDType' and default_validation_class = 'UTF8Type' and key_validation_class = 'UTF8Type' and memtable_operations = 0.290625 and memtable_thr

我正在创建一个列族,其中TimeUUIDType作为行名:

create column family users
with column_type = 'Standard'
and comparator = 'TimeUUIDType'
and default_validation_class = 'UTF8Type'
and key_validation_class = 'UTF8Type'
and memtable_operations = 0.290625
and memtable_throughput = 62
and memtable_flush_after = 1440
and rows_cached = 0.0
and row_cache_save_period = 0
and keys_cached = 200000.0
and key_cache_save_period = 14400
and read_repair_chance = 1.0
and gc_grace = 864000
and min_compaction_threshold = 4
and max_compaction_threshold = 32
and replicate_on_write = true
and row_cache_provider = 'ConcurrentLinkedHashCacheProvider'
and column_metadata=[
{column_name: allias, validation_class: UTF8Type, index_type: KEYS, index_name: allias},
{column_name: st_user_id, validation_class: TimeUUIDType, index_type: KEYS, index_name: st_user_id},
{column_name: st_money, validation_class: IntegerType},
{column_name: mail, validation_class: UTF8Type},
{column_name: password, validation_class: UTF8Type},
{column_name: last_visit, validation_class: DateType},
{column_name: registered, validation_class: DateType}
];
但我有一个例外:

org.apache.cassandra.db.marshal.MarshalException:无法强制 “allias”至版本1 UUID


我做错了什么?

列族的comparator属性用于对行中的列进行排序。您正在尝试使用TimeUUID比较器,这将要求每个列名都是TimeUUID值

如果您想使用TimeUUID作为行键,但使用字符串作为列名,您可能只想切换这些设置的值

comparator = 'UTF8Type',
key_validation_class = 'TimeUUIDType'