hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mingjie Lai <mjla...@gmail.com>
Subject Re: Quick way to find the number of rows in a Table
Date Fri, 03 Dec 2010 06:41:53 GMT

HBase-1512 is about implementing aggregation by coprocessor.
https://issues.apache.org/jira/browse/HBASE-1512

But it still needs to scan each region to get the row count. It's like a 
light-weight map/red method, so it's not the super ``quick'' way.

Jonathan mentioned to use a separate table to record/count rows in 
another email. I read something similar before at:
http://whynosql.com/aggregation-with-hbase/

FYI.

-Mingjie


On 12/02/2010 05:57 PM, Michael Segel wrote:
>
>
> Uhm just a sick thought... with the talks about coprocessors...
>
> Couldn't one write something to monitor the WAL and manage record/row counts?
> Sort of use coprocessors to manage statistics and such.
>
> Ok... I'll go back to my carb deprived diet now... :-)
>
> -Mike
>
>> Date: Thu, 2 Dec 2010 16:52:09 -0800
>> Subject: Re: Quick way to find the number of rows in a Table
>> From: stack@duboce.net
>> To: user@hbase.apache.org
>>
>> What Michael said.
>>
>> Run the rowcounter M/R job:
>>
>> Type:
>>
>> ./bin/hadoop jar hbase.jar
>>
>> ... to learn more, read
>> http://hbase.apache.org/docs/r0.89.20100924/apidocs/org/apache/hadoop/hbase/mapreduce/package-summary.html#package_description
>>
>> St.Ack
>>
>>
>> On Thu, Dec 2, 2010 at 4:10 PM, Michael Segel<michael_segel@hotmail.com>  wrote:
>>>
>>> The quickest way is a m/r job.
>>>
>>>> From: phaidinyak@local.com
>>>> To: user@hbase.apache.org
>>>> Date: Thu, 2 Dec 2010 16:02:44 -0800
>>>> Subject: Quick way to find the number of rows in a Table
>>>>
>>>> Hi
>>>>     I am going to have a process running that will add rows to a table. The
row id is just a counter of the number of rows inserted. Is there a quick way to programmatically
find out the number of rows in a table so when I start adding rows the count isn't disrupted?
Also, is there a better way to assign a row Id?
>>>>
>>>> Thanks
>>>>
>>>> -Pete
>>>
>   		 	   		

Mime
View raw message