Great- thanks!

-----Original Message-----
From: Keith Turner [mailto:[email protected]] 
Sent: Tuesday, April 24, 2012 12:05 PM
To: [email protected]
Subject: Re: extension to the AgeOffFilter?

Dennis

In 1.4 there is org.apache.accumulo.core.iterators.user.TimestampFilter

Keith

On Tue, Apr 24, 2012 at 11:31 AM, Patrone, Dennis S.
<[email protected]> wrote:
> We have a requirement to be able to query Accumulo within a time window 
> (start AND stop date).  The standard AgeOffFilter allows us to get rid of the 
> data that is too old, but we don't have any easy way to get rid of the data 
> that is too new.
>
> I know I can write my own filter implementation, but as I understand it, that 
> requires deploying a JAR across the cloud which is undesirable in our 
> situation.
>
> We've work around the issue by creating two AgeOffFilters.  One gets rid of 
> the data that is too old.  The other accepts data from the current time 
> ("now") until the time window stop date (i.e., the data that is too new).  
> And then we apply negate()to that filter.
>
> It seems to me a minor change to the AgeOffFilter would allow that class to 
> handle both cases (age off and time windows):
>
> 1.       Provide an optional Boolean flag if the "too new" data should be 
> ignored as well (defaulting to false to maintain backwards compatibility).
>
> 2.       In "accept", if the flag is set and "currentTime - k.getTimestamp()" 
> is negative return false.
>
> Any interest in this change, or providing an alternative class (e.g., 
> "TimeWindowFilter")?  Or does the capability already exist somewhere and I am 
> just missing it?
>
> Thanks,
> Dennis
>
>
> Dennis Patrone
> The Johns Hopkins University / Applied Physics Laboratory
> 240-228-2285 / Washington
> 443-778-2285 / Baltimore
> 443-220-7190 / Cell
> [email protected]<mailto:[email protected]>
>

Reply via email to