如何知道 Cassandra 中键空间和列族的大小? [英] How to know the size of a keyspace and column family in Cassandra?

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

问题描述

最近我开始使用 cassandra 的 Java 驱动程序(cassandra-driver-core-2.0.2)将 Grails 与 Cassandra 集成.所以我很想知道我们如何才能知道我们的表需要多大的大小来存储 cassandra DB 中的数据.

Recently I've started working on Grails integration with Cassandra using the Java driver for cassandra(cassandra-driver-core-2.0.2). So I was curious to know how we can find out how much size our table is taking to store the data in cassandra DB.

我创建了一个名为 Customkeyspace 的键空间和一个名为 Movie 的列族.所以我很想知道我必须使用哪个工具/命令来知道键空间/列族的大小?

I have created a keyspace with name Customkeyspace and a column family called Movie in it. So I was curious to know which tool/Command I have to use to know the size of the keyspace/Column family ?

推荐答案

要获取有关 Cassandra 中列族的统计信息,您只需运行以下命令:

To get statistics regarding column families in Cassandra, you can simply run the command:

nodetool cfstats

它报告有关表的统计信息,包括实时数据大小以及磁盘上的数据.

It reports statistics about tables which include the live data size as well as on disk.

有关 Cassandra 2.1 实用程序的文档可在此处.

The documentation about this utility for Cassandra 2.1 is available here.

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

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