Search code examples
cassandrabigdatacqlshnosql

Which version of cqlsh is compatible with Cassandra 2.1.9?


I am facing the same problem that is mentioned in the question populate_io_cache_on_flush is not a column defined in this metadata.

As per the solution specified by KIC in the 2nd comment on this answer , i need to

"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."

I am using Cassandra 2.1.9. and cqlsh 5.0.1 .

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

Which version of cqlsh should i be using to sort out my problem?

----

Edit(Solved): I got this problem solved by using the client library version 2.1.3.

My maven dependency now looks like:

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

Thanks for your help fellas.


Solution

  • Here's an ultra-ugly, but quick fix:

    Find the cqlsh.py file in your file system, and change DEFAULT_PROTOCOL_VERSION to 3:

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

    On my system (Mac OS X installed via homebrew) this file was in:

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

    The rather odd thing is that you can't override this variable via the command-line..

    You may also have to change the actual CQL version like so:

    cqlsh 127.0.0.1 --cqlversion=3.2.0
    

    Temporary fix to an ultra-annoying problem..