hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stack <st...@duboce.net>
Subject Re: Deleting old versions from a table
Date Wed, 15 Oct 2008 17:37:16 GMT
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
>> <yaire@revenuescience.com>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
>>>
>>>
>>>
>>>
>>>     
>>>       
>
>   


Mime
View raw message