org.apache.hadoop.hbase.mapred
Class TableReduce
java.lang.Object
org.apache.hadoop.mapred.MapReduceBase
org.apache.hadoop.hbase.mapred.TableReduce
- All Implemented Interfaces:
- Closeable, JobConfigurable, Reducer
- Direct Known Subclasses:
- IdentityTableReduce
public abstract class TableReduce
- extends MapReduceBase
- implements Reducer
Write a table, sorting by the input key
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TableReduce
public TableReduce()
- Constructor
initJob
public static void initJob(String table,
Class<? extends TableReduce> reducer,
JobConf job)
- Use this before submitting a TableReduce job. It will
appropriately set up the JobConf.
- Parameters:
table
- reducer
- job
-
reduce
public void reduce(WritableComparable key,
Iterator values,
OutputCollector output,
Reporter reporter)
throws IOException
- Create a unique key for table insertion by appending a local
counter the given key.
- Specified by:
reduce
in interface Reducer
- Parameters:
key
- the keyvalues
- the values to combineoutput
- to collect combined values
- Throws:
IOException
- See Also:
Reducer.reduce(org.apache.hadoop.io.WritableComparable, java.util.Iterator, org.apache.hadoop.mapred.OutputCollector, org.apache.hadoop.mapred.Reporter)
reduce
public abstract void reduce(Text key,
Iterator values,
TableOutputCollector output,
Reporter reporter)
throws IOException
- Parameters:
key
- values
- output
- reporter
-
- Throws:
IOException
Copyright © 2006 The Apache Software Foundation