Re: Query a version of a column efficiently

2012-08-01 Thread Jerry Lam
Thanks Suraj. I looked at the code but it looks like the logic is not self-contained, particularly for the way hbase works with search for a specific version using TimeRange. Best Regards, Jerry On Mon, Jul 30, 2012 at 12:53 PM, Suraj Varma wrote: > You may need to setup your Eclipse workspace

Re: Query a version of a column efficiently

2012-07-30 Thread Suraj Varma
You may need to setup your Eclipse workspace and search using references etc.To get started, this is one class that uses TimeRange based matching ... org.apache.hadoop.hbase.regionserver.ScanQueryMatcher Also - Get is internally implemented as a Scan over a single row. Hope this gets you started.

Re: Query a version of a column efficiently

2012-07-26 Thread Jerry Lam
Hi St.Ack: Can you tell me which source code is responsible for the logic. The source code in the get and scan doesnt provide an indication of how the setTimeRange works. Best Regards, Jerry Sent from my iPad (sorry for spelling mistakes) On 2012-07-26, at 18:30, Stack wrote: > On Thu, Jul

Re: Query a version of a column efficiently

2012-07-26 Thread Stack
On Thu, Jul 26, 2012 at 11:40 PM, Jerry Lam wrote: > Hi St.Ack: > > Let say there are 5 versions for a column A with timestamp = [0, 1, 3, 6, > 10]. > I want to execute an efficient query that returns one version of the column > that has a timestamp that is equal to 5 or less. So in this case, it

Re: Query a version of a column efficiently

2012-07-26 Thread Tom Brown
Somebody will correct me if I'm wrong, but I think that for your example, you should use setTimeRange(0, 5) and setMaxVersion(1). It's my understanding that those settings will give you the 1 latest version from all applicable version (0 <= timestamp <= 5). Since it's pretty easy to set the times

Re: Query a version of a column efficiently

2012-07-26 Thread Jerry Lam
Hi St.Ack: Let say there are 5 versions for a column A with timestamp = [0, 1, 3, 6, 10]. I want to execute an efficient query that returns one version of the column that has a timestamp that is equal to 5 or less. So in this case, it should return the value of the column A with timestamp = 3. Us

Re: Query a version of a column efficiently

2012-07-26 Thread Stack
On Thu, Jul 26, 2012 at 7:43 PM, Jerry Lam 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 equ

Query a version of a column efficiently

2012-07-26 Thread Jerry Lam
Hi HBase guru: 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, retur