protected class DBInputFormat.DBRecordReader extends Object implements RecordReader<LongWritable,T>
| 限定符 | 构造器和说明 |
|---|---|
protected |
DBInputFormat.DBRecordReader(DBInputFormat.DBInputSplit split,
Class<T> inputClass,
JobConf job) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Close this
InputSplit to future operations. |
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.
|
float |
getProgress()
How much of the input has the
RecordReader consumed i.e. |
protected String |
getSelectQuery()
Returns the query for selecting the records,
subclasses can override this for custom behaviour.
|
boolean |
next(LongWritable key,
T value)
Reads the next key/value pair from the input for processing.
|
protected DBInputFormat.DBRecordReader(DBInputFormat.DBInputSplit split, Class<T> inputClass, JobConf job) throws SQLException
split - The InputSplit to read data forSQLExceptionprotected String getSelectQuery()
public void close()
throws IOException
InputSplit to future operations.close 在接口中 RecordReader<LongWritable,T extends DBWritable>IOExceptionpublic LongWritable createKey()
createKey 在接口中 RecordReader<LongWritable,T extends DBWritable>public T createValue()
createValue 在接口中 RecordReader<LongWritable,T extends DBWritable>public long getPos()
throws IOException
getPos 在接口中 RecordReader<LongWritable,T extends DBWritable>IOExceptionpublic float getProgress()
throws IOException
RecordReader consumed i.e.
has been processed by?getProgress 在接口中 RecordReader<LongWritable,T extends DBWritable>0.0 to 1.0.IOExceptionpublic boolean next(LongWritable key, T value) throws IOException
next 在接口中 RecordReader<LongWritable,T extends DBWritable>key - the key to read data intovalue - the value to read data intoIOExceptionCopyright © 2009 The Apache Software Foundation