使用 Cassandra 和 cqlsh 检查 CQL 版本? [英] Check CQL version with Cassandra and cqlsh?

查看:28
本文介绍了使用 Cassandra 和 cqlsh 检查 CQL 版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何查看 cqlsh 中当前使用的是哪个 cql 版本?

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

在sql中,你这样做:

In sql, you do this:

Select @@version

推荐答案

有几种方法可以解决这个问题.

There are a couple of ways to go about this.

在 cqlsh 中,您可以简单地显示版本.

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]

然而,这只适用于 cqlsh.幸运的是,您也可以查询 system.local 以获取该信息.

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)

system.local 表还包含有关当前节点、集群和 Cassandra 工具版本的其他有用信息.有关更多信息,请使用 SELECT * FROM system.local;(只有 1 行)或 desc table system.local 查看.

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.

这篇关于使用 Cassandra 和 cqlsh 检查 CQL 版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆