我用CQLsh -3.0创建了一个表,并在其中插入了值。
create table users (
Id uuid PRIMARY KEY,
Name varchar,
Age int
);
insert into users(Id, Name, Age) values ('001', 'XYZ', '30');
cqlsh:usertable> select * from users;
id | age | name
--------------------------------------+-----+--------
1381b530-1dd2-11b2-0000-242d50cf1ffd | 30 | XYZ
13816710-1dd2-11b2-0000-242d50cf1ffd | 28 | ABC
13818e20-1dd2-11b2-0000-242d50cf1ffd | 30 | PQR但是,当我尝试从Cassandra-CLI接口向这个表中插入新行时,它崩溃了:
[default@unknown] use usertable;
Authenticated to keyspace: usertable
[default@usertable]
[default@usertable] set users['005']['name'] = 'MNO';
log4j:WARN No appenders could be found for logger (org.apache.cassandra.config.DatabaseDescriptor).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Cannot locate cassandra.yaml
Fatal configuration error; unable to start server. See log for stacktrace.其他人有没有观察到类似的行为?Cassandra- CQLsh 3.0和Cassandra-CLI3.0之间有什么不兼容吗?此外,我在使用CQLsh规范2.0.0时也看到了类似的结果!
谢谢,VS
发布于 2012-12-27 04:31:33
您的"Id“值是一个uuid。尝试将uuid设置为16字节值;在较新版本的CLI中,列验证更为严格。
https://stackoverflow.com/questions/12601806
复制相似问题