protected class DBInputFormat.DBRecordReader extends DBRecordReader<T> implements RecordReader<org.apache.hadoop.io.LongWritable,T>
statement| Modifier | Constructor and Description |
|---|---|
protected |
DBInputFormat.DBRecordReader(DBInputFormat.DBInputSplit split,
Class<T> inputClass,
JobConf job)
The constructor is kept to be compatible with M/R 1.x
|
protected |
DBInputFormat.DBRecordReader(DBInputFormat.DBInputSplit split,
Class<T> inputClass,
JobConf job,
Connection conn,
DBConfiguration dbConfig,
String cond,
String[] fields,
String table) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.io.LongWritable |
createKey()
Create an object of the appropriate type to be used as a key.
|
T |
createValue()
Create an object of the appropriate type to be used as a value.
|
long |
getPos()
Returns the current position in the input.
|
boolean |
next(org.apache.hadoop.io.LongWritable key,
T value)
Reads the next key/value pair from the input for processing.
|
close, executeQuery, getConditions, getConnection, getCurrentKey, getCurrentValue, getDBConf, getFieldNames, getProgress, getSelectQuery, getSplit, getStatement, getTableName, initialize, nextKeyValue, setStatementclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getProgressprotected DBInputFormat.DBRecordReader(DBInputFormat.DBInputSplit split, Class<T> inputClass, JobConf job) throws SQLException
split - The InputSplit to read data forSQLExceptionprotected DBInputFormat.DBRecordReader(DBInputFormat.DBInputSplit split, Class<T> inputClass, JobConf job, Connection conn, DBConfiguration dbConfig, String cond, String[] fields, String table) throws SQLException
split - The InputSplit to read data forSQLExceptionpublic org.apache.hadoop.io.LongWritable createKey()
createKey in interface RecordReader<org.apache.hadoop.io.LongWritable,T extends DBWritable>public T createValue()
createValue in interface RecordReader<org.apache.hadoop.io.LongWritable,T extends DBWritable>createValue in class DBRecordReader<T extends DBWritable>public long getPos()
throws IOException
RecordReadergetPos in interface RecordReader<org.apache.hadoop.io.LongWritable,T extends DBWritable>getPos in class DBRecordReader<T extends DBWritable>IOExceptionpublic boolean next(org.apache.hadoop.io.LongWritable key,
T value)
throws IOException
next in interface RecordReader<org.apache.hadoop.io.LongWritable,T extends DBWritable>next in class DBRecordReader<T extends DBWritable>key - the key to read data intovalue - the value to read data intoIOExceptionCopyright © 2022 Apache Software Foundation. All rights reserved.