@InterfaceAudience.Public public class IdentityTableMapper extends TableMapper<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>
| Constructor and Description |
|---|
IdentityTableMapper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
initJob(String table,
org.apache.hadoop.hbase.client.Scan scan,
Class<? extends TableMapper> mapper,
org.apache.hadoop.mapreduce.Job job)
Use this before submitting a TableMap job.
|
void |
map(org.apache.hadoop.hbase.io.ImmutableBytesWritable key,
org.apache.hadoop.hbase.client.Result value,
org.apache.hadoop.mapreduce.Mapper.Context context)
Pass the key, value to reduce.
|
public static void initJob(String table, org.apache.hadoop.hbase.client.Scan scan, Class<? extends TableMapper> mapper, org.apache.hadoop.mapreduce.Job job) throws IOException
table - The table name.scan - The scan with the columns to scan.mapper - The mapper class.job - The job configuration.IOException - When setting up the job fails.public void map(org.apache.hadoop.hbase.io.ImmutableBytesWritable key,
org.apache.hadoop.hbase.client.Result value,
org.apache.hadoop.mapreduce.Mapper.Context context)
throws IOException,
InterruptedException
map in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result,org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>key - The current key.value - The current value.context - The current context.IOException - When writing the record fails.InterruptedException - When the job is aborted.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.