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, setStatement
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, getProgress
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) throws java.sql.SQLException
split
- The InputSplit to read data forjava.sql.SQLException
public 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
RecordReader
getPos
in interface RecordReader<org.apache.hadoop.io.LongWritable,T extends DBWritable>
getPos
in class DBRecordReader<T extends DBWritable>
java.io.IOException
public 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.IOException
Copyright © 2009 The Apache Software Foundation