org.apache.hadoop.hbase.mapred
Class TableReduce<K extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable>

java.lang.Object
  extended by org.apache.hadoop.mapred.MapReduceBase
      extended by org.apache.hadoop.hbase.mapred.TableReduce<K,V>
All Implemented Interfaces:
org.apache.hadoop.io.Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Reducer<K,V,ImmutableBytesWritable,BatchUpdate>
Direct Known Subclasses:
IdentityTableReduce

public abstract class TableReduce<K extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable>
extends org.apache.hadoop.mapred.MapReduceBase
implements org.apache.hadoop.mapred.Reducer<K,V,ImmutableBytesWritable,BatchUpdate>

Write a table, sorting by the input key


Constructor Summary
TableReduce()
           
 
Method Summary
static void initJob(String table, Class<? extends TableReduce> reducer, org.apache.hadoop.mapred.JobConf job)
          Use this before submitting a TableReduce job.
abstract  void reduce(K key, Iterator<V> values, org.apache.hadoop.mapred.OutputCollector<ImmutableBytesWritable,BatchUpdate> output, org.apache.hadoop.mapred.Reporter reporter)
           
 
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
 

Constructor Detail

TableReduce

public TableReduce()
Method Detail

initJob

public static void initJob(String table,
                           Class<? extends TableReduce> reducer,
                           org.apache.hadoop.mapred.JobConf job)
Use this before submitting a TableReduce job. It will appropriately set up the JobConf.

Parameters:
table -
reducer -
job -

reduce

public abstract void reduce(K key,
                            Iterator<V> values,
                            org.apache.hadoop.mapred.OutputCollector<ImmutableBytesWritable,BatchUpdate> output,
                            org.apache.hadoop.mapred.Reporter reporter)
                     throws IOException
Specified by:
reduce in interface org.apache.hadoop.mapred.Reducer<K extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,ImmutableBytesWritable,BatchUpdate>
Parameters:
key -
values -
output -
reporter -
Throws:
IOException


Copyright © 2008 The Apache Software Foundation