cassandra版本错误

1 cassandra cqlsh

嗨,有人告诉我应该使用哪个版本的cassandra来运行cqlsh-3.4.3,这样我就可以运行GROUP BY查询了.

目前我的环境是

[cqlsh 5.0.1 | Cassandra 3.9 | CQL spec 3.4.2 | Native protocol v4]
Run Code Online (Sandbox Code Playgroud)

尝试bin/cqlsh时出错--cqlversion = 3.4.3

Connection error: ('Unable to connect to any servers', {'127.0.0.1': ProtocolError("cql_version '3.4.3' is not supported by remote (w/ native protocol). Supported versions: [u'3.4.2']",)})
Run Code Online (Sandbox Code Playgroud)

请Suggest.Thanks.

尝试使用cassandra 3.7时也出现相同的错误.

BAE*_*BAE 6

您可以尝试使用该选项强制cqlsh使用特定的cql版本

--cqlversion = "#.#.#"

示例:cqlsh 127.0.0.1 9042 --cqlversion ="3.2.0"(在您的情况下:3.4.2)

我的例子:

me@XXX:~$ cqlsh <cassandra_ip>
Connection error: ('Unable to connect to any servers', {<cassandra_ip>: ProtocolError("cql_version '3.4.2' is not supported by remote (w/ native protocol). Supported versions: [u'3.3.1']",)})
me@XXX:~$ cqlsh <cassandra_ip> --cqlversion="3.3.1"
Connected to UAT Analytics Cluster at <cassandra_ip>:9042.
[cqlsh 5.0.1 | Cassandra 2.2.8 | CQL spec 3.3.1 | Native protocol v4]
Use HELP for help.
cqlsh> 
Run Code Online (Sandbox Code Playgroud)

UPDATE

(1)group by将在CQL 3.4.3和Cassandra 3.10中得到支持.

(2)不建议为特定版本的Cassandra 升级CQL规范.或者,无法为一个Cassandra版本(此处)升级CQL规范版本.

(3)为了使用group by,你应该将cassandra升级到3.10,或者用户定义的函数,或者改变你的表格设计......