public abstract class StreamBaseRecordReader extends java.lang.Object implements RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
StreamXmlRecordReader
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
StreamBaseRecordReader(org.apache.hadoop.fs.FSDataInputStream in,
FileSplit split,
Reporter reporter,
JobConf job,
org.apache.hadoop.fs.FileSystem fs) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this to future operations.
|
org.apache.hadoop.io.Text |
createKey()
Create an object of the appropriate type to be used as a key.
|
org.apache.hadoop.io.Text |
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. |
abstract boolean |
next(org.apache.hadoop.io.Text key,
org.apache.hadoop.io.Text value)
Read a record.
|
abstract void |
seekNextRecordBoundary()
Implementation should seek forward in_ to the first byte of the next record.
|
public abstract boolean next(org.apache.hadoop.io.Text key, org.apache.hadoop.io.Text value) throws java.io.IOException
next
in interface RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
key
- the key to read data intovalue
- the value to read data intojava.io.IOException
public long getPos() throws java.io.IOException
getPos
in interface RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
java.io.IOException
public void close() throws java.io.IOException
close
in interface RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
java.io.IOException
public float getProgress() throws java.io.IOException
RecordReader
RecordReader
consumed i.e.
has been processed by?getProgress
in interface RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
0.0
to 1.0
.java.io.IOException
public org.apache.hadoop.io.Text createKey()
RecordReader
createKey
in interface RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
public org.apache.hadoop.io.Text createValue()
RecordReader
createValue
in interface RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
public abstract void seekNextRecordBoundary() throws java.io.IOException
java.io.IOException
Copyright © 2009 The Apache Software Foundation