cqlsh不会在表中显示冻结集合

时间:2015-12-22 14:31:34

标签: java cassandra kundera cassandra-2.1

CREATE TABLE data.banks (
    id text,
    codes frozen<map<text, text>>
 PRIMARY KEY (id,codes));

在代码字段

上添加了@Frozen("map<text, text>") anotation的相应模型类

插入正常,但是当我打开cqlsh并运行

select * from data.banks我收到以下错误

Traceback (most recent call last):
  File "/usr/bin/cqlsh", line 1078, in perform_simple_statement
    rows = self.session.execute(statement, trace=self.tracing_enabled)
  File "/usr/share/cassandra/lib/cassandra-driver-internal-only-2.6.0c2.post.zip/cassandra-driver-2.6.0c2.post/cassandra/cluster.py", line 1594, in execute
    result = future.result(timeout)
  File "/usr/share/cassandra/lib/cassandra-driver-internal-only-2.6.0c2.post.zip/cassandra-driver-2.6.0c2.post/cassandra/cluster.py", line 3296, in result
    raise self._final_exception
error: unpack requires a string argument of length 4

另一个问题是当我添加一行值时(&#39; 1&#39;,{&#39;代码2&#39;:&#39; 435sdfd&#39;,&#39;代码1&#39; ;:&#39; 2132sd&#39;})。它显示插入一行。但是当我添加另一行时(&#39; 1&#39;,{&#39;代码2&#39;:&#39; 435sdfe&#39;,&#39;代码1&#39;:&#39; 2132sd& #39;})。 它抛出了TimedOut Exception。

使用cassandra 2.1.8,cassandra-driver-mapping 2.1.8,kundera-cassandra-pelops 3.0版本。

0 个答案:

没有答案