public class MultiTableInputFormat extends MultiTableInputFormatBase
Usage example
List<Scan> scans = new ArrayList<Scan>();
Scan scan1 = new Scan();
scan1.setStartRow(firstRow1);
scan1.setStopRow(lastRow1);
scan1.setAttribute(Scan.SCAN_ATTRIBUTES_TABLE_NAME, table1);
scans.add(scan1);
Scan scan2 = new Scan();
scan2.setStartRow(firstRow2);
scan2.setStopRow(lastRow2);
scan1.setAttribute(Scan.SCAN_ATTRIBUTES_TABLE_NAME, table2);
scans.add(scan2);
TableMapReduceUtil.initTableMapperJob(scans, TableMapper.class, Text.class,
IntWritable.class, job);
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SCANS
Job parameter that specifies the scan list.
|
| Constructor and Description |
|---|
MultiTableInputFormat() |
| Modifier and Type | Method and Description |
|---|---|
Configuration |
getConf()
Returns the current configuration.
|
void |
setConf(Configuration configuration)
Sets the configuration.
|
createRecordReader, getScans, getSplits, includeRegionInSplit, setScans, setTableRecordReaderpublic static final java.lang.String SCANS
public Configuration getConf()
org.apache.hadoop.conf.Configurable#getConf()public void setConf(Configuration configuration)
configuration - The configuration to set.org.apache.hadoop.conf.Configurable#setConf(
org.apache.hadoop.conf.Configuration)