Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check CQL version with Cassandra and cqlsh?

How do you check which cql version is currently being used in cqlsh?

In sql, you do this:

Select @@version 
like image 458
AturSams Avatar asked Jul 19 '15 14:07

AturSams


People also ask

What version of Cassandra am I running?

Open cqlsh and type show VERSION . This gives all the versions of cqlsh, DSE, Cassandra etc.

What protocol Cqlsh uses to connect to a Cassandra node?

cqlsh is implemented with the Python native protocol driver, and connects to the single specified node.


1 Answers

There are a couple of ways to go about this.

From within cqlsh, you can simply show version.

aploetz@cqlsh> show version [cqlsh 5.0.1 | Cassandra 2.1.8 | CQL spec 3.2.0 | Native protocol v3] 

However, that only works from within cqlsh. Fortunately, you can also query system.local for that information as well.

aploetz@cqlsh> SELECT cql_version FROM system.local;   cql_version -------------        3.2.0  (1 rows) 

The system.local table has other useful bits of information about your current node, cluster, and Cassandra tool versions as well. For more info, check it out with either SELECT * FROM system.local; (only has 1 row) or desc table system.local.

like image 83
Aaron Avatar answered Oct 17 '22 07:10

Aaron