Package org.apache.hadoop.hbase.mapred
Class TableInputFormat
java.lang.Object
org.apache.hadoop.hbase.mapred.TableInputFormatBase
org.apache.hadoop.hbase.mapred.TableInputFormat
- All Implemented Interfaces:
org.apache.hadoop.mapred.InputFormat<ImmutableBytesWritable,,Result> org.apache.hadoop.mapred.JobConfigurable
@Public
public class TableInputFormat
extends TableInputFormatBase
implements org.apache.hadoop.mapred.JobConfigurable
Convert HBase tabular data into a format that is consumable by Map/Reduce.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringspace delimited list of columnsprivate static final org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(org.apache.hadoop.mapred.JobConf job) protected voidinitialize(org.apache.hadoop.mapred.JobConf job) Handle subclass specific set up.voidvalidateInput(org.apache.hadoop.mapred.JobConf job) Methods inherited from class org.apache.hadoop.hbase.mapred.TableInputFormatBase
closeTable, getRecordReader, getSplits, getTable, initializeTable, setInputColumns, setRowFilter, setTableRecordReader
-
Field Details
-
LOG
-
COLUMN_LIST
space delimited list of columns- See Also:
-
-
Constructor Details
-
TableInputFormat
public TableInputFormat()
-
-
Method Details
-
configure
- Specified by:
configurein interfaceorg.apache.hadoop.mapred.JobConfigurable
-
initialize
Description copied from class:TableInputFormatBaseHandle subclass specific set up. Each of the entry points used by the MapReduce framework,TableInputFormatBase.getRecordReader(InputSplit, JobConf, Reporter)andTableInputFormatBase.getSplits(JobConf, int), will callTableInputFormatBase.initialize(JobConf)as a convenient centralized location to handle retrieving the necessary configuration information and callingTableInputFormatBase.initializeTable(Connection, TableName). Subclasses should implement their initialize call such that it is safe to call multiple times. The current TableInputFormatBase implementation relies on a non-null table reference to decide if an initialize call is needed, but this behavior may change in the future. In particular, it is critical that initializeTable not be called multiple times since this will leak Connection instances.- Overrides:
initializein classTableInputFormatBase- Throws:
IOException
-
validateInput
- Throws:
IOException
-