protected class DBInputFormat.DBRecordReader extends DBRecordReader<T> implements RecordReader<org.apache.hadoop.io.LongWritable,T>
| Modifier | Constructor and Description |
|---|---|
protected |
DBInputFormat.DBRecordReader(DBInputFormat.DBInputSplit split,
java.lang.Class<T> inputClass,
JobConf job,
java.sql.Connection conn,
DBConfiguration dbConfig,
java.lang.String cond,
java.lang.String[] fields,
java.lang.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, java.lang.Class<T> inputClass, JobConf job, java.sql.Connection conn, DBConfiguration dbConfig, java.lang.String cond, java.lang.String[] fields, java.lang.String table) throws java.sql.SQLException
split - The InputSplit to read data forjava.sql.SQLExceptionpublic 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 java.io.IOException
RecordReadergetPos in interface RecordReader<org.apache.hadoop.io.LongWritable,T extends DBWritable>getPos in class DBRecordReader<T extends DBWritable>java.io.IOExceptionpublic boolean next(org.apache.hadoop.io.LongWritable key,
T value)
throws java.io.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 intojava.io.IOExceptionCopyright © 2009 The Apache Software Foundation