You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by 鄢来琼 <la...@gtafe.com> on 2015/03/10 03:47:03 UTC
how to clear data from disk
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
Re: how to clear data from disk
Posted by Ben Bromhead <be...@instaclustr.com>.
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 <pm...@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, 曹志富 <ca...@gmail.com> wrote:
>
>> nodetool clearsnapshot
>>
>> --------------------------------------
>> Ranger Tsao
>>
>> 2015-03-10 10:47 GMT+08:00 鄢来琼 <la...@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
Re: how to clear data from disk
Posted by Patrick McFadin <pm...@gmail.com>.
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, 曹志富 <ca...@gmail.com> wrote:
> nodetool clearsnapshot
>
> --------------------------------------
> Ranger Tsao
>
> 2015-03-10 10:47 GMT+08:00 鄢来琼 <la...@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
>>
>
>
Re: how to clear data from disk
Posted by 曹志富 <ca...@gmail.com>.
nodetool clearsnapshot
--------------------------------------
Ranger Tsao
2015-03-10 10:47 GMT+08:00 鄢来琼 <la...@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
>