You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Ali Ahsan <al...@panasiangroup.com> on 2011/02/04 11:05:06 UTC

How to delete bulk data from cassandra 0.6.3

Hi All

Is there any way i can delete column families data (not removing column 
families ) from Cassandra without effecting ring integrity.What if  i 
delete some column families data in linux with rm command  ?

-- 
S.Ali Ahsan

Senior System Engineer

e-Business (Pvt) Ltd

49-C Jail Road, Lahore, P.O. Box 676
Lahore 54000, Pakistan

Tel: +92 (0)42 3758 7140 Ext. 128

Mobile: +92 (0)345 831 8769

Fax: +92 (0)42 3758 0027

Email: ali.ahsan@panasiangroup.com



www.ebusiness-pg.com

www.panasiangroup.com

Confidentiality: This e-mail and any attachments may be confidential
and/or privileged. If you are not a named recipient, please notify the
sender immediately and do not disclose the contents to another person
use it for any purpose or store or copy the information in any medium.
Internet communications cannot be guaranteed to be timely, secure, error
or virus-free. We do not accept liability for any errors or omissions.


Re: How to delete bulk data from cassandra 0.6.3

Posted by Ali Ahsan <al...@panasiangroup.com>.
Thanks for detailed replay


On 02/05/2011 10:01 PM, Edward Capriolo wrote:
> On Sat, Feb 5, 2011 at 11:35 AM, Ali Ahsan<al...@panasiangroup.com>  wrote:
>> Thanks for replying Edward Capriolo.Will this effect cassandra ring
>>   integrity? Another question is that will cassandra work properly after this
>> operation.And will it be possible to restore deleted  data from backup?.
>>
>>> in 0.6.X
>>> pkill `pid of cassandra`
>>> rm -rf * /var/lib/cassandra/data/<keyspace>/<CF you want to delete>*
>>> (start cassandra)
>>>
>>>
>>
>> --
>> S.Ali Ahsan
>>
>> Senior System Engineer
>>
>> e-Business (Pvt) Ltd
>>
>> 49-C Jail Road, Lahore, P.O. Box 676
>> Lahore 54000, Pakistan
>>
>> Tel: +92 (0)42 3758 7140 Ext. 128
>>
>> Mobile: +92 (0)345 831 8769
>>
>> Fax: +92 (0)42 3758 0027
>>
>> Email: ali.ahsan@panasiangroup.com
>>
>>
>>
>> www.ebusiness-pg.com
>>
>> www.panasiangroup.com
>>
>> Confidentiality: This e-mail and any attachments may be confidential
>> and/or privileged. If you are not a named recipient, please notify the
>> sender immediately and do not disclose the contents to another person
>> use it for any purpose or store or copy the information in any medium.
>> Internet communications cannot be guaranteed to be timely, secure, error
>> or virus-free. We do not accept liability for any errors or omissions.
>>
>>
> I am not sure what you mean by data integrity.
>
> In short, when Cassandra starts up it searches it's data directories
> and loads up the data, index, bloom filters, and saved caches it
> finds.
>
> Unless the files are corrupt it will happily load up what it finds.
>
> Restores are done by the process your described , stop server, restore
> files, start server.
>
>


-- 
S.Ali Ahsan

Senior System Engineer

e-Business (Pvt) Ltd

49-C Jail Road, Lahore, P.O. Box 676
Lahore 54000, Pakistan

Tel: +92 (0)42 3758 7140 Ext. 128

Mobile: +92 (0)345 831 8769

Fax: +92 (0)42 3758 0027

Email: ali.ahsan@panasiangroup.com



www.ebusiness-pg.com

www.panasiangroup.com

Confidentiality: This e-mail and any attachments may be confidential
and/or privileged. If you are not a named recipient, please notify the
sender immediately and do not disclose the contents to another person
use it for any purpose or store or copy the information in any medium.
Internet communications cannot be guaranteed to be timely, secure, error
or virus-free. We do not accept liability for any errors or omissions.


Re: How to delete bulk data from cassandra 0.6.3

Posted by Edward Capriolo <ed...@gmail.com>.
On Sat, Feb 5, 2011 at 11:35 AM, Ali Ahsan <al...@panasiangroup.com> wrote:
> Thanks for replying Edward Capriolo.Will this effect cassandra ring
>  integrity? Another question is that will cassandra work properly after this
> operation.And will it be possible to restore deleted  data from backup?.
>
>> in 0.6.X
>> pkill `pid of cassandra`
>> rm -rf * /var/lib/cassandra/data/<keyspace>/<CF you want to delete>*
>> (start cassandra)
>>
>>
>
>
> --
> S.Ali Ahsan
>
> Senior System Engineer
>
> e-Business (Pvt) Ltd
>
> 49-C Jail Road, Lahore, P.O. Box 676
> Lahore 54000, Pakistan
>
> Tel: +92 (0)42 3758 7140 Ext. 128
>
> Mobile: +92 (0)345 831 8769
>
> Fax: +92 (0)42 3758 0027
>
> Email: ali.ahsan@panasiangroup.com
>
>
>
> www.ebusiness-pg.com
>
> www.panasiangroup.com
>
> Confidentiality: This e-mail and any attachments may be confidential
> and/or privileged. If you are not a named recipient, please notify the
> sender immediately and do not disclose the contents to another person
> use it for any purpose or store or copy the information in any medium.
> Internet communications cannot be guaranteed to be timely, secure, error
> or virus-free. We do not accept liability for any errors or omissions.
>
>

I am not sure what you mean by data integrity.

In short, when Cassandra starts up it searches it's data directories
and loads up the data, index, bloom filters, and saved caches it
finds.

Unless the files are corrupt it will happily load up what it finds.

Restores are done by the process your described , stop server, restore
files, start server.

Re: How to delete bulk data from cassandra 0.6.3

Posted by Ali Ahsan <al...@panasiangroup.com>.
Thanks for replying Edward Capriolo.Will this effect cassandra ring  
integrity? Another question is that will cassandra work properly after 
this operation.And will it be possible to restore deleted  data from 
backup?.

> in 0.6.X
> pkill `pid of cassandra`
> rm -rf * /var/lib/cassandra/data/<keyspace>/<CF you want to delete>*
> (start cassandra)
>
>


-- 
S.Ali Ahsan

Senior System Engineer

e-Business (Pvt) Ltd

49-C Jail Road, Lahore, P.O. Box 676
Lahore 54000, Pakistan

Tel: +92 (0)42 3758 7140 Ext. 128

Mobile: +92 (0)345 831 8769

Fax: +92 (0)42 3758 0027

Email: ali.ahsan@panasiangroup.com



www.ebusiness-pg.com

www.panasiangroup.com

Confidentiality: This e-mail and any attachments may be confidential
and/or privileged. If you are not a named recipient, please notify the
sender immediately and do not disclose the contents to another person
use it for any purpose or store or copy the information in any medium.
Internet communications cannot be guaranteed to be timely, secure, error
or virus-free. We do not accept liability for any errors or omissions.


Re: How to delete bulk data from cassandra 0.6.3

Posted by Edward Capriolo <ed...@gmail.com>.
On Sat, Feb 5, 2011 at 4:12 AM, Ali Ahsan <al...@panasiangroup.com> wrote:
> Any update on this?
>
> On 02/05/2011 12:53 AM, Ali Ahsan wrote:
>>
>> So do we need to write a script ? or its some thing i can do as a system
>> admin without involving and developer.If yes please guide me in this case.
>>
>>
>>
>>
>> On 02/04/2011 10:36 PM, Jonathan Ellis wrote:
>>>
>>> In that case, you should shut down the server before removing data files.
>>>
>>> On Fri, Feb 4, 2011 at 9:01 AM,<ro...@gmail.com>  wrote:
>>>>
>>>> I thought truncate() was not available before 0.7 (in 0.6.3)....was it?
>>>>
>>>> ---------------------------------------------------
>>>> Sent from BlackBerry
>>>>
>>>> -----Original Message-----
>>>> From: Jonathan Ellis<jb...@gmail.com>
>>>> Date: Fri, 4 Feb 2011 08:58:35
>>>> To: user<us...@cassandra.apache.org>
>>>> Reply-To: user@cassandra.apache.org
>>>> Subject: Re: How to delete bulk data from cassandra 0.6.3
>>>>
>>>> You should use truncate instead. (Then remove the snapshot truncate
>>>> creates.)
>>>>
>>>> On Fri, Feb 4, 2011 at 2:05 AM, Ali Ahsan<al...@panasiangroup.com>
>>>>  wrote:
>>>>>
>>>>> Hi All
>>>>>
>>>>> Is there any way i can delete column families data (not removing column
>>>>> families ) from Cassandra without effecting ring integrity.What if  i
>>>>> delete
>>>>> some column families data in linux with rm command  ?
>>>>>
>>>>> --
>>>>> S.Ali Ahsan
>>>>>
>>>>> Senior System Engineer
>>>>>

>>>>> e-Business (Pvt) Ltd
>>>>>
>>>>> 49-C Jail Road, Lahore, P.O. Box 676
>>>>> Lahore 54000, Pakistan
>>>>>
>>>>> Tel: +92 (0)42 3758 7140 Ext. 128
>>>>>
>>>>> Mobile: +92 (0)345 831 8769
>>>>>
>>>>> Fax: +92 (0)42 3758 0027
>>>>>
>>>>> Email: ali.ahsan@panasiangroup.com
>>>>>
>>>>>
>>>>>
>>>>> www.ebusiness-pg.com
>>>>>
>>>>> www.panasiangroup.com
>>>>>
>>>>> Confidentiality: This e-mail and any attachments may be confidential
>>>>> and/or privileged. If you are not a named recipient, please notify the
>>>>> sender immediately and do not disclose the contents to another person
>>>>> use it for any purpose or store or copy the information in any medium.
>>>>> Internet communications cannot be guaranteed to be timely, secure,
>>>>> error
>>>>> or virus-free. We do not accept liability for any errors or omissions.
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Jonathan Ellis
>>>> Project Chair, Apache Cassandra
>>>> co-founder of DataStax, the source for professional Cassandra support
>>>> http://www.datastax.com
>>>>
>>>
>>>
>>
>>
>
>
> --
> S.Ali Ahsan
>
> Senior System Engineer
>
> e-Business (Pvt) Ltd
>
> 49-C Jail Road, Lahore, P.O. Box 676
> Lahore 54000, Pakistan
>
> Tel: +92 (0)42 3758 7140 Ext. 128
>
> Mobile: +92 (0)345 831 8769
>
> Fax: +92 (0)42 3758 0027
>
> Email: ali.ahsan@panasiangroup.com
>
>
>
> www.ebusiness-pg.com
>
> www.panasiangroup.com
>
> Confidentiality: This e-mail and any attachments may be confidential
> and/or privileged. If you are not a named recipient, please notify the
> sender immediately and do not disclose the contents to another person
> use it for any purpose or store or copy the information in any medium.
> Internet communications cannot be guaranteed to be timely, secure, error
> or virus-free. We do not accept liability for any errors or omissions.
>
>

in 0.6.X
pkill `pid of cassandra`
rm -rf * /var/lib/cassandra/data/<keyspace>/<CF you want to delete>*
(start cassandra)

Re: How to delete bulk data from cassandra 0.6.3

Posted by Ali Ahsan <al...@panasiangroup.com>.
Any update on this?

On 02/05/2011 12:53 AM, Ali Ahsan wrote:
> So do we need to write a script ? or its some thing i can do as a 
> system admin without involving and developer.If yes please guide me in 
> this case.
>
>
>
>
> On 02/04/2011 10:36 PM, Jonathan Ellis wrote:
>> In that case, you should shut down the server before removing data 
>> files.
>>
>> On Fri, Feb 4, 2011 at 9:01 AM,<ro...@gmail.com>  wrote:
>>> I thought truncate() was not available before 0.7 (in 0.6.3)....was it?
>>>
>>> ---------------------------------------------------
>>> Sent from BlackBerry
>>>
>>> -----Original Message-----
>>> From: Jonathan Ellis<jb...@gmail.com>
>>> Date: Fri, 4 Feb 2011 08:58:35
>>> To: user<us...@cassandra.apache.org>
>>> Reply-To: user@cassandra.apache.org
>>> Subject: Re: How to delete bulk data from cassandra 0.6.3
>>>
>>> You should use truncate instead. (Then remove the snapshot truncate 
>>> creates.)
>>>
>>> On Fri, Feb 4, 2011 at 2:05 AM, Ali 
>>> Ahsan<al...@panasiangroup.com>  wrote:
>>>> Hi All
>>>>
>>>> Is there any way i can delete column families data (not removing 
>>>> column
>>>> families ) from Cassandra without effecting ring integrity.What if  
>>>> i delete
>>>> some column families data in linux with rm command  ?
>>>>
>>>> -- 
>>>> S.Ali Ahsan
>>>>
>>>> Senior System Engineer
>>>>
>>>> e-Business (Pvt) Ltd
>>>>
>>>> 49-C Jail Road, Lahore, P.O. Box 676
>>>> Lahore 54000, Pakistan
>>>>
>>>> Tel: +92 (0)42 3758 7140 Ext. 128
>>>>
>>>> Mobile: +92 (0)345 831 8769
>>>>
>>>> Fax: +92 (0)42 3758 0027
>>>>
>>>> Email: ali.ahsan@panasiangroup.com
>>>>
>>>>
>>>>
>>>> www.ebusiness-pg.com
>>>>
>>>> www.panasiangroup.com
>>>>
>>>> Confidentiality: This e-mail and any attachments may be confidential
>>>> and/or privileged. If you are not a named recipient, please notify the
>>>> sender immediately and do not disclose the contents to another person
>>>> use it for any purpose or store or copy the information in any medium.
>>>> Internet communications cannot be guaranteed to be timely, secure, 
>>>> error
>>>> or virus-free. We do not accept liability for any errors or omissions.
>>>>
>>>>
>>>
>>>
>>> -- 
>>> Jonathan Ellis
>>> Project Chair, Apache Cassandra
>>> co-founder of DataStax, the source for professional Cassandra support
>>> http://www.datastax.com
>>>
>>
>>
>
>


-- 
S.Ali Ahsan

Senior System Engineer

e-Business (Pvt) Ltd

49-C Jail Road, Lahore, P.O. Box 676
Lahore 54000, Pakistan

Tel: +92 (0)42 3758 7140 Ext. 128

Mobile: +92 (0)345 831 8769

Fax: +92 (0)42 3758 0027

Email: ali.ahsan@panasiangroup.com



www.ebusiness-pg.com

www.panasiangroup.com

Confidentiality: This e-mail and any attachments may be confidential
and/or privileged. If you are not a named recipient, please notify the
sender immediately and do not disclose the contents to another person
use it for any purpose or store or copy the information in any medium.
Internet communications cannot be guaranteed to be timely, secure, error
or virus-free. We do not accept liability for any errors or omissions.


Re: How to delete bulk data from cassandra 0.6.3

Posted by Ali Ahsan <al...@panasiangroup.com>.
So do we need to write a script ? or its some thing i can do as a system 
admin without involving and developer.If yes please guide me in this case.




On 02/04/2011 10:36 PM, Jonathan Ellis wrote:
> In that case, you should shut down the server before removing data files.
>
> On Fri, Feb 4, 2011 at 9:01 AM,<ro...@gmail.com>  wrote:
>> I thought truncate() was not available before 0.7 (in 0.6.3)....was it?
>>
>> ---------------------------------------------------
>> Sent from BlackBerry
>>
>> -----Original Message-----
>> From: Jonathan Ellis<jb...@gmail.com>
>> Date: Fri, 4 Feb 2011 08:58:35
>> To: user<us...@cassandra.apache.org>
>> Reply-To: user@cassandra.apache.org
>> Subject: Re: How to delete bulk data from cassandra 0.6.3
>>
>> You should use truncate instead. (Then remove the snapshot truncate creates.)
>>
>> On Fri, Feb 4, 2011 at 2:05 AM, Ali Ahsan<al...@panasiangroup.com>  wrote:
>>> Hi All
>>>
>>> Is there any way i can delete column families data (not removing column
>>> families ) from Cassandra without effecting ring integrity.What if  i delete
>>> some column families data in linux with rm command  ?
>>>
>>> --
>>> S.Ali Ahsan
>>>
>>> Senior System Engineer
>>>
>>> e-Business (Pvt) Ltd
>>>
>>> 49-C Jail Road, Lahore, P.O. Box 676
>>> Lahore 54000, Pakistan
>>>
>>> Tel: +92 (0)42 3758 7140 Ext. 128
>>>
>>> Mobile: +92 (0)345 831 8769
>>>
>>> Fax: +92 (0)42 3758 0027
>>>
>>> Email: ali.ahsan@panasiangroup.com
>>>
>>>
>>>
>>> www.ebusiness-pg.com
>>>
>>> www.panasiangroup.com
>>>
>>> Confidentiality: This e-mail and any attachments may be confidential
>>> and/or privileged. If you are not a named recipient, please notify the
>>> sender immediately and do not disclose the contents to another person
>>> use it for any purpose or store or copy the information in any medium.
>>> Internet communications cannot be guaranteed to be timely, secure, error
>>> or virus-free. We do not accept liability for any errors or omissions.
>>>
>>>
>>
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of DataStax, the source for professional Cassandra support
>> http://www.datastax.com
>>
>
>


-- 
S.Ali Ahsan

Senior System Engineer

e-Business (Pvt) Ltd

49-C Jail Road, Lahore, P.O. Box 676
Lahore 54000, Pakistan

Tel: +92 (0)42 3758 7140 Ext. 128

Mobile: +92 (0)345 831 8769

Fax: +92 (0)42 3758 0027

Email: ali.ahsan@panasiangroup.com



www.ebusiness-pg.com

www.panasiangroup.com

Confidentiality: This e-mail and any attachments may be confidential
and/or privileged. If you are not a named recipient, please notify the
sender immediately and do not disclose the contents to another person
use it for any purpose or store or copy the information in any medium.
Internet communications cannot be guaranteed to be timely, secure, error
or virus-free. We do not accept liability for any errors or omissions.


Re: How to delete bulk data from cassandra 0.6.3

Posted by Jonathan Ellis <jb...@gmail.com>.
In that case, you should shut down the server before removing data files.

On Fri, Feb 4, 2011 at 9:01 AM,  <ro...@gmail.com> wrote:
> I thought truncate() was not available before 0.7 (in 0.6.3)....was it?
>
> ---------------------------------------------------
> Sent from BlackBerry
>
> -----Original Message-----
> From: Jonathan Ellis <jb...@gmail.com>
> Date: Fri, 4 Feb 2011 08:58:35
> To: user<us...@cassandra.apache.org>
> Reply-To: user@cassandra.apache.org
> Subject: Re: How to delete bulk data from cassandra 0.6.3
>
> You should use truncate instead. (Then remove the snapshot truncate creates.)
>
> On Fri, Feb 4, 2011 at 2:05 AM, Ali Ahsan <al...@panasiangroup.com> wrote:
>> Hi All
>>
>> Is there any way i can delete column families data (not removing column
>> families ) from Cassandra without effecting ring integrity.What if  i delete
>> some column families data in linux with rm command  ?
>>
>> --
>> S.Ali Ahsan
>>
>> Senior System Engineer
>>
>> e-Business (Pvt) Ltd
>>
>> 49-C Jail Road, Lahore, P.O. Box 676
>> Lahore 54000, Pakistan
>>
>> Tel: +92 (0)42 3758 7140 Ext. 128
>>
>> Mobile: +92 (0)345 831 8769
>>
>> Fax: +92 (0)42 3758 0027
>>
>> Email: ali.ahsan@panasiangroup.com
>>
>>
>>
>> www.ebusiness-pg.com
>>
>> www.panasiangroup.com
>>
>> Confidentiality: This e-mail and any attachments may be confidential
>> and/or privileged. If you are not a named recipient, please notify the
>> sender immediately and do not disclose the contents to another person
>> use it for any purpose or store or copy the information in any medium.
>> Internet communications cannot be guaranteed to be timely, secure, error
>> or virus-free. We do not accept liability for any errors or omissions.
>>
>>
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com

Re: How to delete bulk data from cassandra 0.6.3

Posted by ro...@gmail.com.
I thought truncate() was not available before 0.7 (in 0.6.3)....was it?

---------------------------------------------------
Sent from BlackBerry

-----Original Message-----
From: Jonathan Ellis <jb...@gmail.com>
Date: Fri, 4 Feb 2011 08:58:35 
To: user<us...@cassandra.apache.org>
Reply-To: user@cassandra.apache.org
Subject: Re: How to delete bulk data from cassandra 0.6.3

You should use truncate instead. (Then remove the snapshot truncate creates.)

On Fri, Feb 4, 2011 at 2:05 AM, Ali Ahsan <al...@panasiangroup.com> wrote:
> Hi All
>
> Is there any way i can delete column families data (not removing column
> families ) from Cassandra without effecting ring integrity.What if  i delete
> some column families data in linux with rm command  ?
>
> --
> S.Ali Ahsan
>
> Senior System Engineer
>
> e-Business (Pvt) Ltd
>
> 49-C Jail Road, Lahore, P.O. Box 676
> Lahore 54000, Pakistan
>
> Tel: +92 (0)42 3758 7140 Ext. 128
>
> Mobile: +92 (0)345 831 8769
>
> Fax: +92 (0)42 3758 0027
>
> Email: ali.ahsan@panasiangroup.com
>
>
>
> www.ebusiness-pg.com
>
> www.panasiangroup.com
>
> Confidentiality: This e-mail and any attachments may be confidential
> and/or privileged. If you are not a named recipient, please notify the
> sender immediately and do not disclose the contents to another person
> use it for any purpose or store or copy the information in any medium.
> Internet communications cannot be guaranteed to be timely, secure, error
> or virus-free. We do not accept liability for any errors or omissions.
>
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com

Re: How to delete bulk data from cassandra 0.6.3

Posted by Jonathan Ellis <jb...@gmail.com>.
You should use truncate instead. (Then remove the snapshot truncate creates.)

On Fri, Feb 4, 2011 at 2:05 AM, Ali Ahsan <al...@panasiangroup.com> wrote:
> Hi All
>
> Is there any way i can delete column families data (not removing column
> families ) from Cassandra without effecting ring integrity.What if  i delete
> some column families data in linux with rm command  ?
>
> --
> S.Ali Ahsan
>
> Senior System Engineer
>
> e-Business (Pvt) Ltd
>
> 49-C Jail Road, Lahore, P.O. Box 676
> Lahore 54000, Pakistan
>
> Tel: +92 (0)42 3758 7140 Ext. 128
>
> Mobile: +92 (0)345 831 8769
>
> Fax: +92 (0)42 3758 0027
>
> Email: ali.ahsan@panasiangroup.com
>
>
>
> www.ebusiness-pg.com
>
> www.panasiangroup.com
>
> Confidentiality: This e-mail and any attachments may be confidential
> and/or privileged. If you are not a named recipient, please notify the
> sender immediately and do not disclose the contents to another person
> use it for any purpose or store or copy the information in any medium.
> Internet communications cannot be guaranteed to be timely, secure, error
> or virus-free. We do not accept liability for any errors or omissions.
>
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com