hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stack <st...@duboce.net>
Subject Re: Query a version of a column efficiently
Date Thu, 26 Jul 2012 21:13:43 GMT
On Thu, Jul 26, 2012 at 7:43 PM, Jerry Lam <chilinglam@gmail.com> wrote:
> I need some advises on a problem that I'm facing using HBase. How can I
> efficiently query a version of a column when I don't know exactly the
> version I'm looking for?
> For instance, I want to query a column with timestamp that is less or equal
> to N, if version = N is available, return it to me. Otherwise, I want the
> version that is closest to the version N (order by descending of
> timestamp). That is if version = N - 1 exists, I want it to be returned.

Have you tried a timerange w/ minStamp of N and maxStamp of
HConstants#LATEST_TIMESTAMP Long.MAX_VALUE) returning one version only


View raw message