@InterfaceAudience.Public public class MultiTableInputFormat extends MultiTableInputFormatBase implements org.apache.hadoop.conf.Configurable
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 String |
SCANS
Job parameter that specifies the scan list.
|
| Constructor and Description |
|---|
MultiTableInputFormat() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.conf.Configuration |
getConf()
Returns the current configuration.
|
void |
setConf(org.apache.hadoop.conf.Configuration configuration)
Sets the configuration.
|
createRecordReader, getScans, getSplits, includeRegionInSplit, setScans, setTableRecordReaderpublic static final String SCANS
public MultiTableInputFormat()
public org.apache.hadoop.conf.Configuration getConf()
getConf in interface org.apache.hadoop.conf.ConfigurableConfigurable.getConf()public void setConf(org.apache.hadoop.conf.Configuration configuration)
setConf in interface org.apache.hadoop.conf.Configurableconfiguration - The configuration to set.Configurable.setConf( org.apache.hadoop.conf.Configuration)Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.