如何查找 Cassandra Keyspaces 中表的大小?

发布于 2025-01-17 03:10:35 字数 212 浏览 2 评论 0原文

我已经使用此命令来获取表的大小

nodetool cfstats -- <Keyspace>.<table name>

但是,我不确定它是否正确或错误,就像我将更多行上传到表中一样,“已用空间”没有改变,只有“Memtable 数据大小”正在改变。

我只想知道如何查找 cassandra 键空间中表的大小。

I have used this command to get the size of a table

nodetool cfstats -- <Keyspace>.<table name>

But, I am not sure whether it is right or wrong as if I upload more rows into my table, "Space Used" is not changing only "Memtable data size" is changing.

I just wanna know how to find the size of a table in cassandra keyspaces.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花辞树 2025-01-24 03:10:35

当节点收到突变(写入)时,它首先会保存在提交日志中,然后写入内存表。在内存表刷新到磁盘之前,突变/写入不会持久化到 SSTable。

如果您想强制将内存表刷新到磁盘,请运行:

$ nodetool flush -- ks_name table_name

有关详细信息,请参阅 数据如何在 Cassandra 中写入。干杯!

When a node receives a mutation (a write), it first gets persisted in a commit log then written to a memtable. The mutations/writes are not persisted to a SSTable until the memtable is flushed to disk.

If you want to force the memtables to be flushed to disk, run:

$ nodetool flush -- ks_name table_name

For more info, see How data is written in Cassandra. Cheers!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文