You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by schnitzi <ma...@fastsearch.com> on 2009/07/13 09:50:59 UTC

Filtering by timestamp in map/reduce

I am writing a map/reduce process that takes an HBase table as input, but I
need to filter the column values based on their values at a given timestamp. 
So I was hoping I could just create a row filter to do this, then pass it in
via TableInputFormatBase#setRowFilter.  However, it appears that none of the
provided filter classes (which implement ColumnValueFilter) filter by a
timestamped value.  Nor does it seem to be possible to even write my own -
none of the methods provided gives me a way to get at the timestamped value.

So, is there an alternate way to achieve this?
-- 
View this message in context: http://www.nabble.com/Filtering-by-timestamp-in-map-reduce-tp24457474p24457474.html
Sent from the HBase User mailing list archive at Nabble.com.


Re: Filtering by timestamp in map/reduce

Posted by Doğacan Güney <do...@gmail.com>.
On Mon, Jul 13, 2009 at 10:50, schnitzi<ma...@fastsearch.com> wrote:
>
> I am writing a map/reduce process that takes an HBase table as input, but I
> need to filter the column values based on their values at a given timestamp.
> So I was hoping I could just create a row filter to do this, then pass it in
> via TableInputFormatBase#setRowFilter.  However, it appears that none of the
> provided filter classes (which implement ColumnValueFilter) filter by a
> timestamped value.  Nor does it seem to be possible to even write my own -
> none of the methods provided gives me a way to get at the timestamped value.
>
> So, is there an alternate way to achieve this?

KeyValue (passed to filterKeyValue) has a getTimestamp method. I am not sure but
I think you can define a Scan to read multiple versions then use
filterKeyValue to filter
based on timestamps.

(btw, this is only possible with hbase trunk and new mapreduce api)

> --
> View this message in context: http://www.nabble.com/Filtering-by-timestamp-in-map-reduce-tp24457474p24457474.html
> Sent from the HBase User mailing list archive at Nabble.com.
>
>



-- 
Doğacan Güney