You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by tgh <gu...@ia.ac.cn> on 2012/12/27 09:15:34 UTC

which API is to get table meta data in hbase

Hi
	I try to use API of hbase, and I store a big table in hbase,
	But I have not find how to get the row number of this big table, 
	I say , 
	AggregationClient#rowCount() is to statistic the Number of given
Family and given col in a table, and it scan the related region to satistic
the Number, that is, some colume can be null, is it,

	But I say, there need some meta data which record how many row
number in the give table, I say , hbase has this meta data, is it,
	And which API is to get it, and how to use API,


Could you help me

Thank you
---------------------
Tian Guanhua







答复: which API is to get table meta data in hbase

Posted by tgh <gu...@ia.ac.cn>.
Thank you for your reply

I try to use AggregationClient API , but as you know ,I want to know how
many rows there, scanner will scan whole table one by one row, is it, 
And It is not slow for a big table , is it,

And you say make a record when we insert message in the table, it is a good
idea, but we have store the record there, and want to statistic the number
of record ,
And there is some speed up method for the scan,


Could you help me

Thank you
---------------------
Tian Guanhua




-----邮件原件-----
发件人: user-return-32787-guanhua.tian=ia.ac.cn@hbase.apache.org
[mailto:user-return-32787-guanhua.tian=ia.ac.cn@hbase.apache.org] 代表 Anoop
Sam John
发送时间: 2012年12月27日 16:23
收件人: user@hbase.apache.org
主题: RE: which API is to get table meta data in hbase


> But I say, there need some meta data which record how many row
number in the give table, I say , hbase has this meta data, is it,
        And which API is to get it, and how to use API,

There is no such meta data for a table.

You can check whether you can do this work on your own using co processors.
There were some discussion on this in the mailing list. Sorry I am not able
find the links for that now. You can create another table and store the
stats there in the second table.

But see whether you can make use of the AggregationClient API. U have some
column for which every row will have a not null value??

-Anoop-
________________________________________
From: tgh [guanhua.tian@ia.ac.cn]
Sent: Thursday, December 27, 2012 1:45 PM
To: user@hbase.apache.org
Subject: which API is to get table meta data in hbase

Hi
        I try to use API of hbase, and I store a big table in hbase,
        But I have not find how to get the row number of this big table,
        I say ,
        AggregationClient#rowCount() is to statistic the Number of given
Family and given col in a table, and it scan the related region to satistic
the Number, that is, some colume can be null, is it,

        But I say, there need some meta data which record how many row
number in the give table, I say , hbase has this meta data, is it,
        And which API is to get it, and how to use API,


Could you help me

Thank you
---------------------
Tian Guanhua=



RE: which API is to get table meta data in hbase

Posted by Anoop Sam John <an...@huawei.com>.
> But I say, there need some meta data which record how many row
number in the give table, I say , hbase has this meta data, is it,
        And which API is to get it, and how to use API,

There is no such meta data for a table.

You can check whether you can do this work on your own using co processors. There were some discussion on this in the mailing list. Sorry I am not able find the links for that now. You can create another table and store the stats there in the second table.

But see whether you can make use of the AggregationClient API. U have some column for which every row will have a not null value??

-Anoop-
________________________________________
From: tgh [guanhua.tian@ia.ac.cn]
Sent: Thursday, December 27, 2012 1:45 PM
To: user@hbase.apache.org
Subject: which API is to get table meta data in hbase

Hi
        I try to use API of hbase, and I store a big table in hbase,
        But I have not find how to get the row number of this big table,
        I say ,
        AggregationClient#rowCount() is to statistic the Number of given
Family and given col in a table, and it scan the related region to satistic
the Number, that is, some colume can be null, is it,

        But I say, there need some meta data which record how many row
number in the give table, I say , hbase has this meta data, is it,
        And which API is to get it, and how to use API,


Could you help me

Thank you
---------------------
Tian Guanhua