public class SimpleFileRecordReader extends Object implements org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
Modifier and Type | Field and Description |
---|---|
protected org.apache.hadoop.mapred.JobConf |
jobConf |
protected org.apache.hadoop.mapred.Reporter |
reporter |
Constructor and Description |
---|
SimpleFileRecordReader(org.apache.hadoop.mapred.FileSplit inputSplit,
org.apache.hadoop.mapred.JobConf jobConf,
org.apache.hadoop.mapred.Reporter reporter) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
org.apache.hadoop.io.Text |
createKey()
Create an empty Text object in which the key can be stored
|
org.apache.hadoop.io.Text |
createValue()
Create an empty Text object in which the value can be stored
|
protected String |
getOutputPath() |
long |
getPos() |
float |
getProgress() |
boolean |
next(org.apache.hadoop.io.Text key,
org.apache.hadoop.io.Text value)
Store the next record to be processed in the provided key/value objects.
|
protected boolean |
verifyProcessFile(String filePath)
Verifies that the file at the provided file path should, indeed, be
processed.
|
protected org.apache.hadoop.mapred.JobConf jobConf
protected org.apache.hadoop.mapred.Reporter reporter
public SimpleFileRecordReader(org.apache.hadoop.mapred.FileSplit inputSplit, org.apache.hadoop.mapred.JobConf jobConf, org.apache.hadoop.mapred.Reporter reporter)
public boolean next(org.apache.hadoop.io.Text key, org.apache.hadoop.io.Text value) throws IOException
next
in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
IOException
protected String getOutputPath()
protected boolean verifyProcessFile(String filePath)
filePath
- the path of the file to be verifiedpublic org.apache.hadoop.io.Text createKey()
createKey
in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
public org.apache.hadoop.io.Text createValue()
createValue
in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
public long getPos() throws IOException
getPos
in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
IOException
public void close() throws IOException
close
in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
IOException
public float getProgress() throws IOException
getProgress
in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
IOException
Copyright © 2009-2013 DuraSpace. All Rights Reserved.