Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> Scanning half a key or value in HBase


Copy link to this message
-
Re: Scanning half a key or value in HBase
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 <[EMAIL PROTECTED]>:
> 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
>
>
>