org.apache.hadoop.hbase.mapred
Class TableReduce<K extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable>
java.lang.Object
org.apache.hadoop.mapred.MapReduceBase
org.apache.hadoop.hbase.mapred.TableReduce<K,V>
- Type Parameters:
K - key classV - value class
- All Implemented Interfaces:
- 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
| 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 |
TableReduce
public TableReduce()
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