hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: How to quickly count the rows that meet several conditions using hbase coprocessor
Date Fri, 17 Jan 2014 10:03:26 GMT
Take a look at http://hbase.apache.org/0.94/apidocs/org/apache/hadoop/hbase/client/coprocessor/AggregationClient.html#rowCount(byte[],%20org.apache.hadoop.hbase.coprocessor.ColumnInterpreter,%20org.apache.hadoop.hbase.client.Scan)

You can pass custom filter through Scan parameter. 

Cheers

On Jan 16, 2014, at 11:58 PM, "leiwangouc@gmail.com" <leiwangouc@gmail.com> wrote:

> Hi,
> 
> I know that hbase copocessor provides a quick way to count the rows of a table.
> But how can i count the rows that meet several conditions.
> 
> Take this for example. 
> I have a hbase table with one column family, several columns. I want to caculate the
number of rows that meet 3 conditions:
> has column1
> has column2
> has column3  and the value of column3 satisfy a regular expression
> 
> Thans,
> Lei
> 
> 
> 
> leiwangouc@gmail.com

Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message