得到
cassandra error: cannot parse uuid as hex bytes`
java.sql.SQLSyntaxErrorException: cannot parse '8768c481-a118-48b7-aed2-2903b917d045' as hex bytes
at org.apache.cassandra.cql.jdbc.CassandraPreparedStatement.doExecute(CassandraPreparedStatement.java:155)
at org.apache.cassandra.cql.jdbc.CassandraPreparedStatement.execute(CassandraPreparedStatement.java:191)
at CassClass.main(CassClass.java:55)
架构:
{
column_name: key,
validation_class: UTF8Type,
index_type: KEYS
} where key is UUID generated
as UUID key = UUIDGenerator.getInstance().generateRandomBasedUUID();
CLI 命令:
// Created column family with:
create column family newdata with comparator = UTF8Type;
// Then, updated the column family newdata with:
column_metadata =[{column_name: key, validation_class: UTF8Type, index_type: KEYS}];