If you enable aggregation coprocessors you can use aggreation client which is 
more faster than normal count from shell.

http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/coprocessor/AggregationClient.html#rowCount(byte[],
 org.apache.hadoop.hbase.coprocessor.ColumnInterpreter, 
org.apache.hadoop.hbase.client.Scan)

http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/coprocessor/AggregationClient.html#rowCount(org.apache.hadoop.hbase.client.HTable,
 org.apache.hadoop.hbase.coprocessor.ColumnInterpreter, 
org.apache.hadoop.hbase.client.Scan)


________________________________________
From: James Taylor [[email protected]]
Sent: Wednesday, May 29, 2013 4:15 AM
To: [email protected]
Subject: Re: Couting number of records in a HBase table

Another option is Phoenix (https://github.com/forcedotcom/phoenix),
where you'd do
     SELECT count(*) FROM my_table

Regards,
James

On 05/28/2013 03:25 PM, Ted Yu wrote:
> Take a look at http://hbase.apache.org/book.html#rowcounter
>
> Cheers
>
> On Tue, May 28, 2013 at 3:23 PM, Shahab Yunus <[email protected]>wrote:
>
>> Is there a faster way to get the count of rows in a HBase table
>> (potentially a huge one)? I am looking for ways other than the 'count'
>> shell command or any Pig script? Thanks.
>>
>> Regards,
>> Shahab
>>

Reply via email to