如何列出 Cassandra 中所有可用的键空间? [英] How to list all the available keyspaces in Cassandra?

查看:29
本文介绍了如何列出 Cassandra 中所有可用的键空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Cassandra 的新手,正在尝试使用 Cassandra 实现一个玩具应用程序.我在 Cassandra 数据库中创建了一个键空间和几个列族,但我忘记了集群的名称.

I am newbie in Cassandra and trying to implement one toy application using Cassandra. I had created one keyspace and few column families in my Cassandra DB but I forgot the name of my cluster.

我正在尝试查找是否有任何查询可以列出所有可用的键空间.

I am trying to find if there is any query which can list down all the available keyspaces.

有人知道这样的查询或命令吗?

Anybody knows such a query or command?

推荐答案

如果您想在 cqlsh 工具之外执行此操作,您可以查询 schema_keyspaces 表中的system 键空间.还有一个名为 schema_columnfamilies 的表,其中包含有关所有表的信息.

If you want to do this outside of the cqlsh tool you can query the schema_keyspaces table in the system keyspace. There's also a table called schema_columnfamilies which contains information about all tables.

DESCRIBESHOW 命令仅适用于 cqlshcassandra-cli.

The DESCRIBE and SHOW commands only work in cqlsh and cassandra-cli.

这篇关于如何列出 Cassandra 中所有可用的键空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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