@InterfaceAudience.Public public class CellCounter extends org.apache.hadoop.conf.Configured implements org.apache.hadoop.util.Tool
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 can take optional parameters 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 or a start time and/or end time to limit the count to a time range.
Modifier and Type | Class and Description |
---|---|
(package private) static class |
CellCounter.CellCounterMapper
Mapper that runs the count.
|
(package private) static class |
CellCounter.IntSumReducer<Key> |
Modifier and Type | Field and Description |
---|---|
private static String |
JOB_NAME_CONF_KEY |
private static org.slf4j.Logger |
LOG |
(package private) static String |
NAME
Name of this 'program'.
|
Constructor and Description |
---|
CellCounter() |
Modifier and Type | Method and Description |
---|---|
static org.apache.hadoop.mapreduce.Job |
createSubmittableJob(org.apache.hadoop.conf.Configuration conf,
String[] args)
Sets up the actual job.
|
private static Scan |
getConfiguredScanForJob(org.apache.hadoop.conf.Configuration conf,
String[] args) |
private static Filter |
getRowFilter(String[] args) |
private static long[] |
getTimeRange(String[] args) |
static void |
main(String[] args)
Main entry point.
|
private void |
printUsage(int parameterCount) |
int |
run(String[] args) |
private static final org.slf4j.Logger LOG
static final String NAME
private static final String JOB_NAME_CONF_KEY
public CellCounter()
public static org.apache.hadoop.mapreduce.Job createSubmittableJob(org.apache.hadoop.conf.Configuration conf, String[] args) throws IOException
conf
- The current configuration.args
- The command line parameters.IOException
- When setting up the job fails.private static Scan getConfiguredScanForJob(org.apache.hadoop.conf.Configuration conf, String[] args) throws IOException
IOException
private static Filter getRowFilter(String[] args)
private static long[] getTimeRange(String[] args) throws IOException
IOException
public int run(String[] args) throws Exception
run
in interface org.apache.hadoop.util.Tool
Exception
private void printUsage(int parameterCount)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.