In this recipe, we will show the answer to the following simple question:
How much space is HBase or a single HBase table using on HDFS?
It is a really simple task, but you might need to answer this question frequently. We will give you a tip to make it a bit easier.
Start your HBase cluster and log in to your HBase client node. We assume your HBase root directory on HDFS is /hbase
.
The instructions to show the disk utilization of HBase tables are as follows:
1. Show the disk utilization for all HBase objects by executing the following command:
$ $HADOOP_HOME/bin/hadoop fs -dus /hbase hdfs://master1:8020/hbase 1016842660
2. Show the disk utilization of a particular HBase table (
hly_temp
) by executing the following command:$ $HADOOP_HOME/bin/hadoop fs -dus /hbase/hly_temp hdfs://master1:8020/hbase/hly_temp 54738763
3. Show a list of the regions of an HBase table and their disk utilization, by executing the following command...