org.apache.hadoop.hbase.mapreduce
Class CellCounter

java.lang.Object
  extended by org.apache.hadoop.hbase.mapreduce.CellCounter

public class CellCounter
extends Object

A job with a a map and reduce phase to count cells in a table. The counter lists the following stats for a given table:

 1. Total number of rows in the table
 2. Total number of CFs across all rows
 3. Total qualifiers across all rows
 4. Total occurrence of each CF
 5. Total occurrence  of each qualifier
 6. Total number of versions of each qualifier.
 
The cellcounter takes two optional parameters one to use a user supplied row/family/qualifier string to use in the report and second a regex based or prefix based row filter to restrict the count operation to a limited subset of rows from the table.


Constructor Summary
CellCounter()
           
 
Method Summary
static org.apache.hadoop.mapreduce.Job createSubmittableJob(org.apache.hadoop.conf.Configuration conf, String[] args)
          Sets up the actual job.
static void main(String[] args)
          Main entry point.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CellCounter

public CellCounter()
Method Detail

createSubmittableJob

public static org.apache.hadoop.mapreduce.Job createSubmittableJob(org.apache.hadoop.conf.Configuration conf,
                                                                   String[] args)
                                                            throws IOException
Sets up the actual job.

Parameters:
conf - The current configuration.
args - The command line parameters.
Returns:
The newly created job.
Throws:
IOException - When setting up the job fails.

main

public static void main(String[] args)
                 throws Exception
Main entry point.

Parameters:
args - The command line parameters.
Throws:
Exception - When running the job fails.


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.