Class IdentityTableMapper
java.lang.Object
org.apache.hadoop.mapreduce.Mapper<ImmutableBytesWritable,Result,KEYOUT,VALUEOUT>
org.apache.hadoop.hbase.mapreduce.TableMapper<ImmutableBytesWritable,Result>
org.apache.hadoop.hbase.mapreduce.IdentityTableMapper
Pass the given key and record as-is to the reduce phase.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
org.apache.hadoop.mapreduce.Mapper.Context
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
initJob
(String table, Scan scan, Class<? extends TableMapper> mapper, org.apache.hadoop.mapreduce.Job job) Use this before submitting a TableMap job.void
map
(ImmutableBytesWritable key, Result value, org.apache.hadoop.mapreduce.Mapper<ImmutableBytesWritable, Result, ImmutableBytesWritable, Result>.org.apache.hadoop.mapreduce.Mapper.Context context) Pass the key, value to reduce.Methods inherited from class org.apache.hadoop.mapreduce.Mapper
cleanup, run, setup
-
Constructor Details
-
IdentityTableMapper
public IdentityTableMapper()
-
-
Method Details
-
initJob
public static void initJob(String table, Scan scan, Class<? extends TableMapper> mapper, org.apache.hadoop.mapreduce.Job job) throws IOException Use this before submitting a TableMap job. It will appropriately set up the job.- Parameters:
table
- The table name.scan
- The scan with the columns to scan.mapper
- The mapper class.job
- The job configuration.- Throws:
IOException
- When setting up the job fails.
-
map
public void map(ImmutableBytesWritable key, Result value, org.apache.hadoop.mapreduce.Mapper<ImmutableBytesWritable, Result, throws IOException, InterruptedExceptionImmutableBytesWritable, Result>.org.apache.hadoop.mapreduce.Mapper.Context context) Pass the key, value to reduce.- Overrides:
map
in classorg.apache.hadoop.mapreduce.Mapper<ImmutableBytesWritable,
Result, ImmutableBytesWritable, Result> - Parameters:
key
- The current key.value
- The current value.context
- The current context.- Throws:
IOException
- When writing the record fails.InterruptedException
- When the job is aborted.
-