hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stack <st...@duboce.net>
Subject Re: How to get the total size of all the values in a table
Date Mon, 16 May 2011 18:53:20 GMT
On Sun, May 15, 2011 at 8:32 PM, 茅旭峰 <m9suns@gmail.com> wrote:
> Hi,
>
> It looks like I can get the total number of keys by 'count' in the hbase
> shell,
> but how to get the total size of all the values in a table.
>


You could amend the rowcounter mapreduce job, subclass it, and have it
output the size of your data.


> Does the result of 'hadoop -dus /hbase/TableName'  make sense?
>

Yes.  Will tell you the data hbase occupies in hdfs.

You can also study the metadata on each hbase hfile.  In its tail, the
hfile has stats on the file.  See
http://hbase.apache.org/book/regions.arch.html#hfile_tool for how to
reap this metadata.

> I noticed that even I was keeping inserting data into the hbase, the size of
> the
> root directory is not always keeping increasing. I guess the logs and
> compaction
> might cause this size shrinking, right?
>

Yeah, size will grow discontinuously with a generally upward tendency
but it'll be lumpy as files are compacted, flushed, and as wal files
are rolled and let go.

St.Ack


> Thanks and regards,
>
> Mao Xu-Feng
>

Mime
View raw message