首页 文章

哪个版本的cqlsh与Cassandra 2.1.9兼容?

提问于
浏览
3

我面临着问题populate_io_cache_on_flush is not a column defined in this metadata中提到的同样问题 .

根据answer在第answer的第2条评论中指定的解决方案,我需要

"Use the same client library than the server is. i.e. after a ubuntu updates the server (what happened today) all your client programs have to upgrade the driver too."

我正在使用Cassandra 2.1.9 . 和cqlsh 5.0.1 .

[cqlsh 5.0.1 | Cassandra 2.1.9 | CQL spec 3.2.0 | Native protocol v3]

我应该使用哪个版本的cqlsh来解决我的问题?

----

Edit(Solved): 我通过使用客户端库版本2.1.3解决了这个问题 .

我的maven依赖现在看起来像:

<dependency>
        <groupId>com.datastax.cassandra</groupId>
        <artifactId>cassandra-driver-core</artifactId>
        <version>2.1.3</version>
</dependency>

谢谢你的帮助 .

2 回答

  • 11

    这是一个超级丑陋但快速修复:

    在文件系统中找到 cqlsh.py 文件,并将 DEFAULT_PROTOCOL_VERSION 更改为3:

    ...
    DEFAULT_CQLVER = '3.3.0'
    DEFAULT_PROTOCOL_VERSION = 3
    DEFAULT_CONNECT_TIMEOUT_SECONDS = 5
    ...
    

    在我的系统上(通过 homebrew 安装Mac OS X),此文件位于:

    /usr/local/Cellar/cassandra/2.2.0/libexec/bin/cqlsh.py
    

    相当奇怪的是你不能通过命令行覆盖这个变量 .

    您可能还需要更改实际的CQL版本,如下所示:

    cqlsh 127.0.0.1 --cqlversion=3.2.0
    

    临时修复一个超烦人的问题..

  • 0

    这是一个错误 . 该问题已在上游修复:https://issues.apache.org/jira/browse/CASSANDRA-13307但尚未发布 . 但是,您可以查看cassandra repo并自行构建 . 或者只是使用pip安装依赖项并从cassandra checkout运行 cqlsh 脚本 .

相关问题