org.apache.hadoop.hbase.mapred
Class TableMap<K extends WritableComparable,V extends Writable>
java.lang.Object
org.apache.hadoop.mapred.MapReduceBase
org.apache.hadoop.hbase.mapred.TableMap<K,V>
- All Implemented Interfaces:
- Closeable, JobConfigurable, Mapper<HStoreKey,MapWritable,K,V>
- Direct Known Subclasses:
- GroupingTableMap, IdentityTableMap
public abstract class TableMap<K extends WritableComparable,V extends Writable>
- extends MapReduceBase
- implements Mapper<HStoreKey,MapWritable,K,V>
Scan an HBase table to sort by a specified sort column.
If the column does not exist, the record is not passed to Reduce.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TableMap
public TableMap()
initJob
public static void initJob(String table,
String columns,
Class<? extends TableMap> mapper,
JobConf job)
- Use this before submitting a TableMap job. It will
appropriately set up the JobConf.
- Parameters:
table
- table namecolumns
- columns to scanmapper
- mapper classjob
- job configuration
map
public abstract void map(HStoreKey key,
MapWritable value,
OutputCollector<K,V> output,
Reporter reporter)
throws IOException
- Call a user defined function on a single HBase record, represented
by a key and its associated record value.
- Specified by:
map
in interface Mapper<HStoreKey,MapWritable,K extends WritableComparable,V extends Writable>
- Parameters:
key
- value
- output
- reporter
-
- Throws:
IOException
Copyright © 2006 The Apache Software Foundation