Package org.apache.hadoop.hbase.mapred
Class IdentityTableMap
java.lang.Object
org.apache.hadoop.mapred.MapReduceBase
org.apache.hadoop.hbase.mapred.IdentityTableMap
- All Implemented Interfaces:
Closeable
,AutoCloseable
,TableMap<ImmutableBytesWritable,
,Result> org.apache.hadoop.io.Closeable
,org.apache.hadoop.mapred.JobConfigurable
,org.apache.hadoop.mapred.Mapper<ImmutableBytesWritable,
Result, ImmutableBytesWritable, Result>
@Public
public class IdentityTableMap
extends org.apache.hadoop.mapred.MapReduceBase
implements TableMap<ImmutableBytesWritable,Result>
Pass the given key and record as-is to reduce
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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, Result value, org.apache.hadoop.mapred.OutputCollector<ImmutableBytesWritable, Result> output, org.apache.hadoop.mapred.Reporter reporter) Pass the key, value to reduceMethods 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
-
Constructor Details
-
IdentityTableMap
public IdentityTableMap()constructor
-
-
Method Details
-
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 namecolumns
- columns to scanmapper
- mapper classjob
- job configuration
-
map
public void map(ImmutableBytesWritable key, Result value, org.apache.hadoop.mapred.OutputCollector<ImmutableBytesWritable, Result> output, org.apache.hadoop.mapred.Reporter reporter) throws IOExceptionPass the key, value to reduce- Specified by:
map
in interfaceorg.apache.hadoop.mapred.Mapper<ImmutableBytesWritable,
Result, ImmutableBytesWritable, Result> - Throws:
IOException
-