如何从Cassandra中的列族回收存储 [英] How to reclaim storage from a column family in Cassandra

查看:81
本文介绍了如何从Cassandra中的列族回收存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在EC2中使用Datastax 2.1社区版本。我在键空间中放了一张大桌子(列族),然后运行 nodetool compact,但是从OpsCenter UI中,我看不到存储容量有任何增加。

I am using Datastax 2.1 community version in EC2. I dropped a big table (column family) in a keyspace and ran "nodetool compact " but from OpsCenter UI, I don't see any increase in storage capacity.

I运行 nodetool compactionstats以查看压缩是否正在进行,但没有执行任何操作:
$ nodetool compactionstats
待处理任务:0
有效压缩剩余时间:n / a

I ran "nodetool compactionstats " to see whether compaction is on-going but there is nothing: $ nodetool compactionstats pending tasks: 0 Active compaction remaining time : n/a

还有其他流程需要吗?

推荐答案

Cassandra,默认情况下配置,保留每个删除的列系列的快照。这是设计使您不会意外删除cf的数据。

Cassandra, in its default configuration, keeps a snapshot of every column family that is dropped. This is by design so you don't lose the data of a cf if you accidentally delete a cf.

您可以在中禁用快照创建cassandra.yaml 。从文档中(请参阅: http://www.datastax.com /documentation/cassandra/2.1/cassandra/configuration/configCassandra_yaml_r.html ):

You can disable the snapshot creation in cassandra.yaml. From the docs (see: http://www.datastax.com/documentation/cassandra/2.1/cassandra/configuration/configCassandra_yaml_r.html ):


auto_snapshot
(默认值: true)启用或禁用是否在键空间截断或删除表之前为数据快照
。为了避免
数据丢失,强烈建议使用默认设置。如果将
设置为false,则将在截断或删除数据时丢失数据。

auto_snapshot (Default: true) Enable or disable whether a snapshot is taken of the data before keyspace truncation or dropping of tables. To prevent data loss, using the default setting is strongly advised. If you set to false, you will lose data on truncation or drop.

如果不禁用自动快照您可以通过 nodetool clearsnapshot 删除生成的快照。请参阅: http://www.datastax.com/documentation/cassandra /2.0/cassandra/tools/toolsClearSnapShot.html

If you don't disable auto snapshots you can remove the generated snapshot via nodetool clearsnapshot. See: http://www.datastax.com/documentation/cassandra/2.0/cassandra/tools/toolsClearSnapShot.html

这篇关于如何从Cassandra中的列族回收存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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