How do I tell what version of Cassandra I'm running?
I just spun up a machine on EC2 running Cassandra following the instructions in the link 开发者_运维知识库below, but I have no idea what version it is. How do I figure this out? I know I'm missing something incredibly simple, just don't know where to look.
http://wiki.apache.org/cassandra/CloudConfig
It might be easier to use nodetools
./nodetool -h localhost version
You could use cqlsh.
$ cqlsh
Connected to Test Cluster at localhost:9160.
[cqlsh 3.1.8 | Cassandra 1.2.18 | CQL spec 3.0.5 | Thrift protocol 19.36.2]
Use HELP for help.
May also use "SHOW VERSION" command in CQL:
cqlsh:mydb> SHOW VERSION ;
[cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native protocol v3]
After reviewing the instructions you listed, it looks like you're on a Debian(-based) system. In particular, in the "Cassandra Basic Setup" section, it says:
Step 3. Install the Debian package for Cassandra
% apt-get update % apt-get install cassandra
At this point, Cassandra will be installed and running. However, it's not configured for a multi-node cluster. So we need to continue.
If you followed this step to install Cassandra, you can simply use Debian's package management tool to inquire about the package you installed:
% dpkg -s cassandra
Try the describe_version()
method.
http://wiki.apache.org/cassandra/API#describe_version
You could query your package manager:
dpkg -l cassandra
or
yum info cassandra
Go to Cqlsh command prompt and type show version
to get the version of cassandra you are using
精彩评论