hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Stepachev <oct...@gmail.com>
Subject Re: Scanning half a key or value in HBase
Date Tue, 17 Aug 2010 12:59:34 GMT
Use scan where start key is <first_half_of_key> itself as bytearray, and
stop key is <first_half_of_key> with last byte in bytearray + 1.

example
abc% should be scan(abc, abd)

2010/8/17 Michelan Arendse <michelan@addynamo.com>:
> Hi
>
> I am not sure if this is possible in HBase. What I am trying to do is scan on a HBase
table with something similar to how SQL would do it.
> e.g. SELECT *
>         FROM <table>
>         WHERE <primary key> LIKE '<first_half_of_key>%' ;
>
> So as you can see from above I want to scan the table with only part of the row key,
since the key is a combination of 2 fields in the table.
>
> Regards,
> Michelan Arendse
>
>
>

Mime
View raw message