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

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

问题描述

最近,我开始使用Java驱动程序cassandra(cassandra-driver-core-2.0.2)与Gras集成与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天全站免登陆