org.apache.hadoop.hbase.mapred
Class IdentityTableMap

java.lang.Object
  extended by org.apache.hadoop.mapred.MapReduceBase
      extended by org.apache.hadoop.hbase.mapred.TableMap<ImmutableBytesWritable,RowResult>
          extended by org.apache.hadoop.hbase.mapred.IdentityTableMap
All Implemented Interfaces:
org.apache.hadoop.io.Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Mapper<ImmutableBytesWritable,RowResult,ImmutableBytesWritable,RowResult>

public class IdentityTableMap
extends TableMap<ImmutableBytesWritable,RowResult>

Pass the given key and record as-is to reduce


Constructor Summary
IdentityTableMap()
          constructor
 
Method Summary
static void initJob(String table, String columns, Class<? extends TableMap> mapper, org.apache.hadoop.mapred.JobConf job)
          Use this before submitting a TableMap job.
 void map(ImmutableBytesWritable key, RowResult value, org.apache.hadoop.mapred.OutputCollector<ImmutableBytesWritable,RowResult> output, org.apache.hadoop.mapred.Reporter reporter)
          Pass the key, value to reduce
 
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
 

Constructor Detail

IdentityTableMap

public IdentityTableMap()
constructor

Method Detail

initJob

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

Parameters:
table - table name
columns - columns to scan
mapper - mapper class
job - job configuration

map

public void map(ImmutableBytesWritable key,
                RowResult value,
                org.apache.hadoop.mapred.OutputCollector<ImmutableBytesWritable,RowResult> output,
                org.apache.hadoop.mapred.Reporter reporter)
         throws IOException
Pass the key, value to reduce

Specified by:
map in interface org.apache.hadoop.mapred.Mapper<ImmutableBytesWritable,RowResult,ImmutableBytesWritable,RowResult>
Specified by:
map in class TableMap<ImmutableBytesWritable,RowResult>
Throws:
IOException


Copyright © 2008 The Apache Software Foundation