You can extend RowFilter by extracting the reverse timestamp suffix and
compare it with the time range.
In filterRowKey() method, if the suffix falls within the time range, return
false. Otherwise return true.

Cheers


On Wed, Jul 23, 2014 at 12:18 PM, Mingtao Zhang <[email protected]>
wrote:

> Thank you :) ... sorry, seems I didn't make the question clear :(.
>
> My rowkey looks similar to this
>
> murmurHashing(<pet name>) + 'reversed time stamp'
>
> I am looking for a way to say 'get all rows within a time range'.
>
> Best Regards,
> Mingtao
>
>
> On Wed, Jul 23, 2014 at 2:43 PM, Jean-Marc Spaggiari <
> [email protected]> wrote:
>
> > Hi Mingtao,
> >
> > You can use Fuzzy filter for this, or regular expression.
> >
> > You can take a look here:
> >
> >
> https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/filter/FuzzyRowFilter.html
> >
> > Fuzzy might not be able to match your last byte variation. You might need
> > the Regex filter for that:
> > RowFilter rowFilter = new RowFilter(CompareOp.EQUAL, regExString);
> >
> > JM
> >
> >
> > 2014-07-23 14:39 GMT-04:00 Mingtao Zhang <[email protected]>:
> >
> > > Hi All,
> > >
> > > Is it possible to pad the first byte while specifiy the following bytes
> > for
> > > rowkey filter?
> > >
> > > xxxxxxxx19890208~xxxxxxxx19890209 will select from the following if
> > > availble:
> > >
> > > 0000000019890208
> > > 0000000119890208
> > > 0000000219890208
> > > ...
> > > 1111111119890208
> > > 0000000019890209
> > > ...
> > > 1111111119890209
> > >
> > > Thank you in advance!
> > >
> > > Best Regards,
> > > Mingtao
> > >
> >
>

Reply via email to