Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 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
>
>
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB