Search code examples
hbasemapr

How to get the size of a mapr-db table?


I followed following steps for creating a mapr-db table:

$ pwd
/mapr/cluster1/user/project

$ls
bin   src

$ maprcli volume create -name project-tables-vol -path /user/project/tables \
    -quota 100G -topology /data/rack1 

$ ls
bin   src   tables

$ hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
hbase(main):001:0> create '/user/project/tables/datastore', 'colfamily1'
0 row(s) in 0.5180 seconds
hbase(main):002:0> exit

$ ls -l tables
total 1
lrwxr-xr-x 1 mapr mapr 2 Oct 25 15:20 datastore -> mapr::table::2252.32.16498

I know table "datastore" is a link to internal mapr-db implementation. But link is always showing size 512 Bytes irrespective of amount of data in that table.

How can i get the size of data in this table in bytes?


Solution

  • You should use the maprcli table info command:

    maprcli table info -path /mapr/my.cluster.com/user/project/tables/datastore -long

    You can find the documentation about this command here: http://doc.mapr.com/display/MapR/table+info