Return-Path: Delivered-To: apmail-hadoop-hbase-user-archive@locus.apache.org Received: (qmail 25721 invoked from network); 15 Oct 2008 17:37:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Oct 2008 17:37:49 -0000 Received: (qmail 63039 invoked by uid 500); 15 Oct 2008 17:37:49 -0000 Delivered-To: apmail-hadoop-hbase-user-archive@hadoop.apache.org Received: (qmail 63014 invoked by uid 500); 15 Oct 2008 17:37:49 -0000 Mailing-List: contact hbase-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hbase-user@hadoop.apache.org Delivered-To: mailing list hbase-user@hadoop.apache.org Received: (qmail 63003 invoked by uid 99); 15 Oct 2008 17:37:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Oct 2008 10:37:49 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [63.203.238.117] (HELO dns.duboce.net) (63.203.238.117) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Oct 2008 17:36:43 +0000 Received: by dns.duboce.net (Postfix, from userid 1008) id C3F7CC563; Wed, 15 Oct 2008 09:07:20 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-26) on dns.duboce.net X-Spam-Level: Received: from durruti.local (unknown [192.168.1.143]) by dns.duboce.net (Postfix) with ESMTP id 09C6AC256 for ; Wed, 15 Oct 2008 09:07:18 -0700 (PDT) Message-ID: <48F62A4C.8080801@duboce.net> Date: Wed, 15 Oct 2008 10:37:16 -0700 From: stack User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) MIME-Version: 1.0 To: hbase-user@hadoop.apache.org Subject: Re: Deleting old versions from a table References: <4B94F7D3090A974E94A9BD23E57BB14301C62EAF@corpdc-exch01.corp.digimine.com> <904471f90810150842lee81a1bya0b0cf11fca9bad1@mail.gmail.com> <4B94F7D3090A974E94A9BD23E57BB14301C62EDA@corpdc-exch01.corp.digimine.com> <48F61864.2020604@duboce.net> <4B94F7D3090A974E94A9BD23E57BB14301C62F11@corpdc-exch01.corp.digimine.com> In-Reply-To: <4B94F7D3090A974E94A9BD23E57BB14301C62F11@corpdc-exch01.corp.digimine.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.4 Thanks for the feedback. I added clarification to TRUNK (I didn't change names of methods; just updated javadoc and added comments around its use in HStore); hbase-929. St.Ack Yair Even-Zohar wrote: > Seems like you and Jim Kellerman are both correct (his reply is that it > is in millisec) > > The timeTotLive (ttl) is a long in the HStore and is represented in > millisecs in HStore but I also found in the code > > if (ttl != HConstants.FOREVER) > this.ttl *= 1000; > > so I could only assume the parameter is passed to the HColumnDescriptor > in seconds. > > Please notice that " int getTimeToLive()" returns an int and not > long. Also, "setTimeToLive(int timeToLive) ". > > > As far as documentation, I pretty much looked everywhere and couldn't > find any reference to the granularity. It would have been sufficient if > the parameter name was changed. That is, instead of: > setTimeToLive(int timeToLive) > use > setTimeToLive(int timeToLiveInSec) > > Additionally, adding this data as a comment for the setter /getter at > HColumnDescriptor would be sufficient as it will be reflected in the api > docs. > > Thanks > -Yair > -----Original Message----- > From: stack [mailto:stack@duboce.net] > Sent: Wednesday, October 15, 2008 11:21 AM > To: hbase-user@hadoop.apache.org > Subject: Re: Deleting old versions from a table > > Looks like ttl is in seconds (See head of the HStore file). > > Do you have suggestion as to where we should document this (Where did > you try looking?). > > Thanks, > St.Ack > > Yair Even-Zohar wrote: > >> I need this feature because I'd like old data to expire after X days. >> I now see that I can use HColumnDescriptor.setTimeToLive(int >> timeToLive). So, my question is what is the granularity of the >> "timeToLive" parameter (Days / Hours/ Second) ? >> >> Thanks >> -Yair >> >> >> -----Original Message----- >> From: Dingding Ye [mailto:yedingding@gmail.com] >> Sent: Wednesday, October 15, 2008 10:43 AM >> To: hbase-user@hadoop.apache.org >> Subject: Re: Deleting old versions from a table >> >> Why do you want to do that? I think limited the column family with >> VERSIONS >> is enough. >> >> On Wed, Oct 15, 2008 at 11:24 PM, Yair Even-Zohar >> wrote: >> >> >> >>> I would like to delete old versions from a table on a daily basis and >>> >>> >> am >> >> >>> thinking to implement: >>> >>> >>> >>> 1) Run a map/reduce (similar to RowCounter) and for each rowid, >>> >>> >> execute >> >> >>> a deleteall(rowed, timestamp) >>> >>> 2) Similar to (1), but with a scanner. I could also write a filter to >>> filter retrieve only rowids that have data older then timestamp. >>> >>> >>> >>> Before I start writing code, I would like to know if there is an >>> existing process to delete old data? >>> >>> >>> >>> Thanks >>> >>> -Yair >>> >>> >>> >>> >>> >>> > >