cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Bromhead <...@instaclustr.com>
Subject Re: how to clear data from disk
Date Fri, 13 Mar 2015 00:24:22 GMT
To clarify on why this behaviour occurs, by default Cassandra will snapshot
a table when you perform any destructive action (TRUNCATE, DROP etc)

see
http://www.datastax.com/documentation/cql/3.0/cql/cql_reference/truncate_r.html

To free disk space after such an operation you will always need to clear
the snapshots (using either of above suggested methods). Unfortunately this
can be a bit painful if you are rotating your tables, say by month, and
want to remove the oldest one from disk as your client will need to speak
JMX as well.

You can disable this behaviour through the use of auto_snapshot in
cassandra.yaml. Though I would strongly recommend leaving this feature
enabled in any sane production environment and cleaning up snapshots as an
independent task!!

On 10 March 2015 at 20:43, Patrick McFadin <pmcfadin@gmail.com> wrote:

> Or just manually delete the files. The directories are broken down by
> keyspace and table.
>
> Patrick
>
> On Mon, Mar 9, 2015 at 7:50 PM, 曹志富 <cao.zhifu@gmail.com> wrote:
>
>> nodetool clearsnapshot
>>
>> --------------------------------------
>> Ranger Tsao
>>
>> 2015-03-10 10:47 GMT+08:00 鄢来琼 <laiqiong.yan@gtafe.com>:
>>
>>>  Hi ALL,
>>>
>>>
>>>
>>> After drop table, I found the data is not removed from disk, I should
>>> reduce the gc_grace_seconds before the drop operation.
>>>
>>> I have to wait for 10 days, but there is not enough disk.
>>>
>>> Could you tell me there is method to clear the data from disk quickly?
>>>
>>> Thank you very much!
>>>
>>>
>>>
>>> Peter
>>>
>>
>>
>


-- 

Ben Bromhead

Instaclustr | www.instaclustr.com | @instaclustr
<http://twitter.com/instaclustr> | (650) 284 9692

Mime
View raw message