If this is done, let's use an alternative class name. Overloading AgeOffFilter to handle both use cases will be confusing, I think.
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]> >
