org.apache.hadoop.hbase.mapred
Class RowCounter
java.lang.Object
org.apache.hadoop.mapred.MapReduceBase
org.apache.hadoop.hbase.mapred.TableMap<org.apache.hadoop.io.Text,org.apache.hadoop.io.MapWritable>
org.apache.hadoop.hbase.mapred.RowCounter
- All Implemented Interfaces:
- org.apache.hadoop.conf.Configurable, org.apache.hadoop.io.Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Mapper<HStoreKey,org.apache.hadoop.io.MapWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.MapWritable>, org.apache.hadoop.util.Tool
public class RowCounter
- extends TableMap<org.apache.hadoop.io.Text,org.apache.hadoop.io.MapWritable>
- implements org.apache.hadoop.util.Tool
A job with a map to count rows.
Map outputs table rows IF the input row has columns that have content.
Uses an IdentityReducer
Method Summary |
org.apache.hadoop.mapred.JobConf |
createSubmittableJob(String[] args)
|
org.apache.hadoop.conf.Configuration |
getConf()
|
static void |
main(String[] args)
|
void |
map(HStoreKey key,
org.apache.hadoop.io.MapWritable value,
org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.Text,org.apache.hadoop.io.MapWritable> output,
org.apache.hadoop.mapred.Reporter reporter)
Call a user defined function on a single HBase record, represented
by a key and its associated record value. |
int |
run(String[] args)
|
void |
setConf(org.apache.hadoop.conf.Configuration c)
|
Methods inherited from class org.apache.hadoop.hbase.mapred.TableMap |
initJob |
Methods inherited from class org.apache.hadoop.mapred.MapReduceBase |
close, configure |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.mapred.JobConfigurable |
configure |
Methods inherited from interface org.apache.hadoop.io.Closeable |
close |
RowCounter
public RowCounter()
map
public void map(HStoreKey key,
org.apache.hadoop.io.MapWritable value,
org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.Text,org.apache.hadoop.io.MapWritable> output,
org.apache.hadoop.mapred.Reporter reporter)
throws IOException
- Description copied from class:
TableMap
- Call a user defined function on a single HBase record, represented
by a key and its associated record value.
- Specified by:
map
in interface org.apache.hadoop.mapred.Mapper<HStoreKey,org.apache.hadoop.io.MapWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.MapWritable>
- Specified by:
map
in class TableMap<org.apache.hadoop.io.Text,org.apache.hadoop.io.MapWritable>
- Throws:
IOException
createSubmittableJob
public org.apache.hadoop.mapred.JobConf createSubmittableJob(String[] args)
throws IOException
- Throws:
IOException
run
public int run(String[] args)
throws Exception
- Specified by:
run
in interface org.apache.hadoop.util.Tool
- Throws:
Exception
getConf
public org.apache.hadoop.conf.Configuration getConf()
- Specified by:
getConf
in interface org.apache.hadoop.conf.Configurable
setConf
public void setConf(org.apache.hadoop.conf.Configuration c)
- Specified by:
setConf
in interface org.apache.hadoop.conf.Configurable
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
Copyright © 2008 The Apache Software Foundation