Class MultiTableInputFormat
java.lang.Object
org.apache.hadoop.mapreduce.InputFormat<ImmutableBytesWritable,Result>
org.apache.hadoop.hbase.mapreduce.MultiTableInputFormatBase
org.apache.hadoop.hbase.mapreduce.MultiTableInputFormat
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
@Public
public class MultiTableInputFormat
extends MultiTableInputFormatBase
implements org.apache.hadoop.conf.Configurable
Convert HBase tabular data from multiple scanners into a format that is consumable by Map/Reduce.
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);
-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class org.apache.hadoop.hbase.mapreduce.MultiTableInputFormatBase
createRecordReader, getScans, getSplits, includeRegionInSplit, setScans, setTableRecordReader
-
Field Details
-
SCANS
Job parameter that specifies the scan list.- See Also:
-
conf
The configuration.
-
-
Constructor Details
-
MultiTableInputFormat
public MultiTableInputFormat()
-
-
Method Details
-
getConf
Returns the current configuration.- Specified by:
getConf
in interfaceorg.apache.hadoop.conf.Configurable
- Returns:
- The current configuration.
- See Also:
-
Configurable.getConf()
-
setConf
Sets the configuration. This is used to set the details for the tables to be scanned.- Specified by:
setConf
in interfaceorg.apache.hadoop.conf.Configurable
- Parameters:
configuration
- The configuration to set.- See Also:
-
Configurable.setConf(org.apache.hadoop.conf.Configuration)
-