Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BE5C7F1D9 for ; Wed, 20 Mar 2013 03:02:27 +0000 (UTC) Received: (qmail 27495 invoked by uid 500); 20 Mar 2013 03:02:25 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 27481 invoked by uid 500); 20 Mar 2013 03:02:25 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 27446 invoked by uid 99); 20 Mar 2013 03:02:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Mar 2013 03:02:23 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of vhmolinar@gmail.com designates 209.85.215.50 as permitted sender) Received: from [209.85.215.50] (HELO mail-la0-f50.google.com) (209.85.215.50) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Mar 2013 03:02:17 +0000 Received: by mail-la0-f50.google.com with SMTP id ec20so2215081lab.23 for ; Tue, 19 Mar 2013 20:01:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=vo1RZBAQ+TZGeYt8gq4qygQT5wEv+vKJ8rX/3Fr1SXI=; b=i0OgY5z50ejhA4s+/sAhltRS2SAfsRpsv3LmuLVEr0Rzi80TYBxZAP5N5sQV2Jjt8q FR68IyCZtjMXFJqb0hu/PxBvbwvEW3u50gj27FjzbaQmChAC+ymkvsqdJYVyu0SRp3RI V65FiFn8uEf8LCxEoJD5kD9b92BvIotY4HhcYDqJ4AuBKV/9CVwYptZAgGtQSZh3Tntr OQmrBXaF66JhU4DTSvX7qqysG5x218tBRL7rCEGQDOsGYV1sHmAFNKVAYsu9PYnSq0jB wggcN+WYAKSvuzdCfUa+9Je4ZyGzgpFbGP0516kEi6iAhSYc8io4J0Kujx7RVZWpdc/N Mg4Q== X-Received: by 10.112.41.101 with SMTP id e5mr8633343lbl.120.1363748516961; Tue, 19 Mar 2013 20:01:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.114.48.9 with HTTP; Tue, 19 Mar 2013 20:01:36 -0700 (PDT) In-Reply-To: <1363748104.87180.GenericBBA@web160902.mail.bf1.yahoo.com> References: <1363748104.87180.GenericBBA@web160902.mail.bf1.yahoo.com> From: =?ISO-8859-1?Q?V=EDctor_Hugo_Oliveira_Molinar?= Date: Wed, 20 Mar 2013 00:01:36 -0300 Message-ID: Subject: Re: Truncate behaviour To: user@cassandra.apache.org, Wei Zhu Content-Type: multipart/alternative; boundary=e0cb4efe2f9ceaaa8504d852712a X-Virus-Checked: Checked by ClamAV on apache.org --e0cb4efe2f9ceaaa8504d852712a Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hum, my bad. Thank you! On Tue, Mar 19, 2013 at 11:55 PM, Wei Zhu wrote: > There is setting in the cassandra.yaml file which controls that. > > > # Whether or not a snapshot is taken of the data before keyspace truncati= on > # or dropping of column families. The STRONGLY advised default of true > # should be used to provide data safety. If you set this flag to false, > you will > # lose data on truncation or drop. > auto_snapshot: true > > > ----- Original Message ----- > From: "V=EDctor Hugo Oliveira Molinar" > To: user@cassandra.apache.org > Sent: Tuesday, March 19, 2013 11:50:35 AM > Subject: Truncate behaviour > > Hello guys! > I'm researching the behaviour for truncate operations at cassandra. > > > Reading the oficial wiki page( http://wiki.apache.org/cassandra/API ) we > can understand it as: > > "Removes all the rows from the given column family." > > > And reading the DataStax page( > http://www.datastax.com/docs/1.0/references/cql/TRUNCATE ) we can > understand it as: > " A TRUNCATE statement results in the immediate, irreversible removal of > all data in the named column family." > > > But I think there is a missing and important point about truncate > operations. > At least at 1.2.0 version, whenever I run a truncate operation, C* > automatically creates a snapshot file of the column family, resulting in = a > fake free disk space. > > I'm intentionally mentioning 'fake free disk space' because I only figure= d > it out when the machine disk space was at high usage. > > > > > - Is it a security C* behaviour of creating snapshots for each CF before > truncate operation? > - In my scenario I need to purge my column family data every day. > I thought that truncate could handle it based at the docs. But it doesnt. > And since I dont want to manually delete those snapshots, I'd like to kno= w > if there is a safe and practical way to perform a daily purge of this CF > data. > > > > Thanks in advance! > --e0cb4efe2f9ceaaa8504d852712a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hum, my bad.

Thank you!

On Tue, Mar 19, 2013 at 11:55 PM, Wei Zhu <wz1975@yahoo.com><= /span> wrote:
There is setting in the cassandra.yaml file = which controls that.


# Whether or not a snapshot is taken of the data before keyspace truncation=
# or dropping of column families. The STRONGLY advised default of true
# should be used to provide data safety. If you set this flag to false, you= will
# lose data on truncation or drop.
auto_snapshot: true
Reading the oficial wiki page( http://wiki.apache.org/cassandra/API ) we = can understand it as:

"Removes all the rows from the given column family."


And reading the DataStax page( http://www.datastax.com/do= cs/1.0/references/cql/TRUNCATE ) we can understand it as:
" A TRUNCATE statement results= in the immediate, irreversible removal of all data in the named column fam= ily."


But I think there is a missing and important point about truncate operation= s.
At least at 1.2.0 version, whenever I run a truncate operation, C* automati= cally creates a snapshot file of the column family, resulting in a fake fre= e disk space.

I'm intentionally mentioning 'fake free disk space' because I o= nly figured it out when the machine disk space was at high usage.




- Is it a security C* behaviour of creating snapshots for each CF before tr= uncate operation?
- In my scenario I need to purge my column family data every day.
I thought that truncate could handle it based at the docs. But it doesnt. And since I dont want to manually delete those snapshots, I'd like to k= now if there is a safe and practical way to perform a daily purge of this C= F data.



Thanks in advance!

--e0cb4efe2f9ceaaa8504d852712a--