August 2012
Intermediate to advanced
332 pages
7h 3m
English
The count command in HBase Shell is a straightforward way to count the row numbers on an HBase table. However, running the count command on a table with a huge amount of data might take a long time to complete. A better approach for this case is to use the RowCounter class. This class will kick a MapReduce job to count the row number on a table, which is much more efficient than the count command.
We will describe the usage of RowCounter in this recipe.
Make sure your Hadoop and HBase clusters are running. MapReduce is also required; if it is not running, start it by using the following command on your JobTracker server:
hadoop@master1$ $HADOOP_HOME/bin/start-mapred.sh
Log in to your HBase client node.
Read now
Unlock full access