【发布时间】:2013-03-31 20:35:28
【问题描述】:
退出 cli 后,我无法从 Cassandra 检索数据。当我在另一个会话中返回获取数据时,我收到此错误:
org.apache.cassandra.db.marshal.MarshalException: 无法将“jsmith”解析为十六进制字节
似乎列族和键空间也保留了。
我还将密钥格式更改为 ascii(假设用户密钥为 ascii;)...这也不会保持设置。
有什么原因吗?怎么回事?
【问题讨论】:
退出 cli 后,我无法从 Cassandra 检索数据。当我在另一个会话中返回获取数据时,我收到此错误:
org.apache.cassandra.db.marshal.MarshalException: 无法将“jsmith”解析为十六进制字节
似乎列族和键空间也保留了。
我还将密钥格式更改为 ascii(假设用户密钥为 ascii;)...这也不会保持设置。
有什么原因吗?怎么回事?
【问题讨论】:
所有“假设”命令都是临时的,并且仅限于单个 cli 会话。对于那些现在没有坐在 cli 前面的人,我们指的是这些:
assume <cf> comparator as <type>;
assume <cf> sub_comparator as <type>;
assume <cf> validator as <type>;
assume <cf> keys as <type>;
Assume one of the attributes (comparator, sub_comparator, validator or keys)
of the given column family match specified type. The specified type will
be used when displaying data returned from the column family.
这些是纯粹的客户端。
您想要做的是将元数据永久记录在 ColumnFamily 定义中,例如来自自述文件,
create column family Users with comparator=UTF8Type and default_validation_class=UTF8Type and key_validation_class=UTF8Type;
这在三个方面与“假设”不同:
假设主要是作为旧数据集的一种解决方法,这些旧数据集无法更新为使用“真正的”服务器端类型。
【讨论】: