public static class TestTableInputFormat.ExampleJobConfigurableTIF extends TestTableInputFormat.ExampleTIF
| Constructor and Description |
|---|
ExampleJobConfigurableTIF() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(JobConf job) |
protected void |
initialize(JobConf job)
Handle subclass specific set up.
|
initializecloseTable, getHTable, getRecordReader, getSplits, getTable, initializeTable, setHTable, setInputColumns, setRowFilter, setTableRecordReaderpublic void configure(JobConf job)
protected void initialize(JobConf job)
throws IOException
TableInputFormatBaseTableInputFormatBase.getRecordReader(InputSplit, JobConf, Reporter) and TableInputFormatBase.getSplits(JobConf, int),
will call TableInputFormatBase.initialize(JobConf) as a convenient centralized location to handle
retrieving the necessary configuration information and calling
TableInputFormatBase.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.initialize in class TestTableInputFormat.ExampleTIFIOException