You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Doğacan Güney <do...@gmail.com> on 2008/09/16 15:49:19 UTC

Reading multiple versions of columns

Hi list,

Is there a way to retrieve multiple versions of a column from hbase? I mean:

Row x:
    Column y:  data1 timestamp1
                      data2 timestamp2
                      data3 timestamp3
                      ......

timestamp1 > timestamp2 > etc...

Does hbase provide a method for getting last two (or n) versions
without knowing their
timestamps? (i.e, data1 and data2).

-- 
Doğacan Güney

RE: Reading multiple versions of columns

Posted by Jim Kellerman <Ji...@microsoft.com>.
Not yet. See HBASE-847.

---
Jim Kellerman, Powerset (Live Search, Microsoft Corporation)


> -----Original Message-----
> From: Doğacan Güney [mailto:dogacan@gmail.com]
> Sent: Tuesday, September 16, 2008 6:49 AM
> To: hbase-user@hadoop.apache.org
> Subject: Reading multiple versions of columns
>
> Hi list,
>
> Is there a way to retrieve multiple versions of a column from hbase? I
> mean:
>
> Row x:
>     Column y:  data1 timestamp1
>                       data2 timestamp2
>                       data3 timestamp3
>                       ......
>
> timestamp1 > timestamp2 > etc...
>
> Does hbase provide a method for getting last two (or n) versions
> without knowing their
> timestamps? (i.e, data1 and data2).
>
> --
> Doğacan Güney

Re: Reading multiple versions of columns

Posted by stack <st...@duboce.net>.
Doğacan Güney wrote:
> Thank you for the answers. What I am looking for is to access this
> information during map reduce (through RowResult). Is this possible
> yet?
No.  Unfortunately.  Its needed.  Its also been asked for previously: 
HBASE-786.
St.Ack

Re: Reading multiple versions of columns

Posted by Doğacan Güney <do...@gmail.com>.
Thank you for the answers. What I am looking for is to access this
information during map reduce (through RowResult). Is this possible
yet?

2008/9/16 stack <st...@duboce.net>:
> Jim's answer applies to scan-time.  Maybe you are asking about get-time?  If
> so,  does HTable#get with versions and optional timestamp parameters work
> for your?  See 1. and 2. below.  The TimestampTestBase unit test is probably
> the description of how it works.
> Yours,
> St.Ack
>
> 1.
> http://hadoop.apache.org/hbase/docs/r0.2.1/api/org/apache/hadoop/hbase/client/HTable.html#get(byte[],%20byte[],%20int)
> 2.
> http://hadoop.apache.org/hbase/docs/r0.2.1/api/org/apache/hadoop/hbase/client/HTable.html#get(byte[],%20byte[],%20long,%20int)
>
> On Tue, Sep 16, 2008 at 6:49 AM, Doğacan Güney <do...@gmail.com> wrote:
>
>> Hi list,
>>
>> Is there a way to retrieve multiple versions of a column from hbase? I
>> mean:
>>
>> Row x:
>>    Column y:  data1 timestamp1
>>                      data2 timestamp2
>>                      data3 timestamp3
>>                      ......
>>
>> timestamp1 > timestamp2 > etc...
>>
>> Does hbase provide a method for getting last two (or n) versions
>> without knowing their
>> timestamps? (i.e, data1 and data2).
>>
>> --
>> Doğacan Güney
>>
>



-- 
Doğacan Güney

Re: Reading multiple versions of columns

Posted by stack <st...@duboce.net>.
Jim's answer applies to scan-time.  Maybe you are asking about get-time?  If
so,  does HTable#get with versions and optional timestamp parameters work
for your?  See 1. and 2. below.  The TimestampTestBase unit test is probably
the description of how it works.
Yours,
St.Ack

1.
http://hadoop.apache.org/hbase/docs/r0.2.1/api/org/apache/hadoop/hbase/client/HTable.html#get(byte[],%20byte[],%20int)
2.
http://hadoop.apache.org/hbase/docs/r0.2.1/api/org/apache/hadoop/hbase/client/HTable.html#get(byte[],%20byte[],%20long,%20int)

On Tue, Sep 16, 2008 at 6:49 AM, Doğacan Güney <do...@gmail.com> wrote:

> Hi list,
>
> Is there a way to retrieve multiple versions of a column from hbase? I
> mean:
>
> Row x:
>    Column y:  data1 timestamp1
>                      data2 timestamp2
>                      data3 timestamp3
>                      ......
>
> timestamp1 > timestamp2 > etc...
>
> Does hbase provide a method for getting last two (or n) versions
> without knowing their
> timestamps? (i.e, data1 and data2).
>
> --
> Doğacan Güney
>