You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by llpind <so...@hotmail.com> on 2009/06/04 00:52:32 UTC

HBase query

This may have been asked before, but I was unable to find by googling.

Is there a way in HBase to get columns based on AND criteria? 

e.g. give me all columns where row key = 'key1' AND row key = 'key2'  etc. 
Basically a type of where clause.

If not supported by API, how would I go about designing a middle layer which
does something like this on top of HBase?  Other products which do something
like this for HBase tables...?

-- 
View this message in context: http://www.nabble.com/HBase-query-tp23860963p23860963.html
Sent from the HBase User mailing list archive at Nabble.com.


Re: HBase query

Posted by Jonathan Gray <jl...@streamy.com>.
Did you read the javadocs?  From the interface it links to all the
implementations.  For example, a row regular expression match:

http://hadoop.apache.org/hbase/docs/r0.19.0/api/org/apache/hadoop/hbase/filter/RegExpRowFilter.html

On Wed, June 3, 2009 4:47 pm, llpind wrote:
>

> Thanks.  I'm somewhat new to HBase java api, do you have example usage of
>  rowfilters, and how I can do logical operations with them?
>
>
>
> Jonathan Gray-2 wrote:
>
>>
>> What you're looking for are row filters.
>>
>>
>> http://hadoop.apache.org/hbase/docs/r0.19.0/api/org/apache/hadoop/hbase
>> /filter/RowFilterInterface.html
>>
>>
>> http://hadoop.apache.org/hbase/docs/r0.19.0/api/org/apache/hadoop/hbase
>> /client/HTable.html#getScanner(byte[][],%20byte[],%20long,%20org.apache
>> .hadoop.hbase.filter.RowFilterInterface)
>>
>>
>> JG
>>
>>
>> On Wed, June 3, 2009 3:52 pm, llpind wrote:
>>
>>>
>>
>>> This may have been asked before, but I was unable to find by
>>> googling.
>>>
>>>
>>> Is there a way in HBase to get columns based on AND criteria?
>>>
>>>
>>>
>>> e.g. give me all columns where row key = 'key1' AND row key = 'key2'
>>> etc. Basically a type of where clause.
>>>
>>>
>>> If not supported by API, how would I go about designing a middle
>>> layer which does something like this on top of HBase?  Other products
>>> which do something like this for HBase tables...?
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/HBase-query-tp23860963p23860963.html
>>> Sent from the HBase User mailing list archive at Nabble.com.
>>>
>>>
>>>
>>>
>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/HBase-query-tp23860963p23861551.html
> Sent from the HBase User mailing list archive at Nabble.com.
>
>
>


Re: HBase query

Posted by llpind <so...@hotmail.com>.
Thanks.  I'm somewhat new to HBase java api, do you have example usage of
rowfilters, and how I can do logical operations with them?



Jonathan Gray-2 wrote:
> 
> What you're looking for are row filters.
> 
> http://hadoop.apache.org/hbase/docs/r0.19.0/api/org/apache/hadoop/hbase/filter/RowFilterInterface.html
> 
> http://hadoop.apache.org/hbase/docs/r0.19.0/api/org/apache/hadoop/hbase/client/HTable.html#getScanner(byte[][],%20byte[],%20long,%20org.apache.hadoop.hbase.filter.RowFilterInterface)
> 
> JG
> 
> On Wed, June 3, 2009 3:52 pm, llpind wrote:
>>
> 
>> This may have been asked before, but I was unable to find by googling.
>>
>>
>> Is there a way in HBase to get columns based on AND criteria?
>>
>>
>> e.g. give me all columns where row key = 'key1' AND row key = 'key2'
>> etc. Basically a type of where clause.
>>
>>
>> If not supported by API, how would I go about designing a middle layer
>> which does something like this on top of HBase?  Other products which do
>> something like this for HBase tables...?
>>
>> --
>> View this message in context:
>> http://www.nabble.com/HBase-query-tp23860963p23860963.html
>> Sent from the HBase User mailing list archive at Nabble.com.
>>
>>
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/HBase-query-tp23860963p23861551.html
Sent from the HBase User mailing list archive at Nabble.com.


Re: HBase query

Posted by Jonathan Gray <jl...@streamy.com>.
What you're looking for are row filters.

http://hadoop.apache.org/hbase/docs/r0.19.0/api/org/apache/hadoop/hbase/filter/RowFilterInterface.html

http://hadoop.apache.org/hbase/docs/r0.19.0/api/org/apache/hadoop/hbase/client/HTable.html#getScanner(byte[][],%20byte[],%20long,%20org.apache.hadoop.hbase.filter.RowFilterInterface)

JG

On Wed, June 3, 2009 3:52 pm, llpind wrote:
>

> This may have been asked before, but I was unable to find by googling.
>
>
> Is there a way in HBase to get columns based on AND criteria?
>
>
> e.g. give me all columns where row key = 'key1' AND row key = 'key2'
> etc. Basically a type of where clause.
>
>
> If not supported by API, how would I go about designing a middle layer
> which does something like this on top of HBase?  Other products which do
> something like this for HBase tables...?
>
> --
> View this message in context:
> http://www.nabble.com/HBase-query-tp23860963p23860963.html
> Sent from the HBase User mailing list archive at Nabble.com.
>
>
>